Part Number Hot Search : 
TBU8005 UC3842 FOD3180 N5401 68HC7 ALVCH16 SWSS01 ISL6322
Product Description
Full Text Search
 

To Download PMA5105 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  data sheet revision 2.1, 2010-06-02 wireless control pma51xx rf transmitter ask/fsk 315/434/868/915 mhz, embedded 8051 microcontroller, 10-bit adc, 125 khz ask lf receiver pma5110 version 1.0 PMA5105 version 1.0 smartlewis? mcu smart low energy wireless syst ems with a microcontroller unit
edition 2010-06-02 published by infineon technologies ag 81726 munich, germany ? 2010 infineon technologies ag all rights reserved. legal disclaimer the information given in this docu ment shall in no event be regarded as a guarantee of conditions or characteristics. with respect to any examples or hints given herein, any typical values stated herein and/or any information regarding the application of the device, infine on technologies hereby disclaims any and all warranties and liabilities of any kind, including witho ut limitation, warranties of non-infrin gement of intellectua l property rights of any third party. information for further information on technology, delivery terms and conditions and prices, please contact the nearest infineon technologies office ( www.infineon.com ). warnings due to technical requirements, components may contain dangerous substances. for information on the types in question, please contact the nearest infineon technologies office. infineon technologies compon ents may be used in life-su pport devices or systems only with the express written approval of infineon technologies, if a failure of such components can reasonably be expected to cause the failure of that life-support device or system or to affect the safe ty or effectiveness of that de vice or system. life support devices or systems are intended to be implanted in the hu man body or to support an d/or maintain and sustain and/or protect human life. if they fail, it is reasonable to assume that the health of the user or other persons may be endangered.
pma51xx data sheet 3 revision 2.1, 2010-06-02 trademarks of infineon technologies ag a-gold?, bluemoon?, comneo n?, convergate?, cosic?, c166?, crossave?, canpak?, cipos?, coolmos?, coolset?, converpath?, corecontrol? , dave?, dualfalc?, duslic?, easypim?, econobridge?, econodual?, econo pack?, econopim?, e- gold?, eicedriver?, eupec?, elic?, epic?, falc ?, fcos?, flexislic?, ge minax?, goldmo s?, hitfet?, hybridpack?, inca?, isac?, isoface?, iso pack?, iworx?, m-gold?, mipaq?, modstack?, muslic?, my-d?, novalithic?, octalfalc?, octat?, omnitune?, omnivia?, optimos?, optiverse?, origa?, profet?, pro-sil?, primepack?, quad falc?, rasic?, reversave?, satric?, sceptre?, scout?, s-gold?, se nsonor?, serocco?, sicofi?, sieget?, sindrion?, slic?, smarti?, smartlewis?, smint?, socr ates?, tempfet?, thinq!?, truentry?, tricore?, trenchstop?, vinax?, vi netic?, viontic?, wildpass?, x-gold?, xmm?, x-pmu?, xposys?, xway?. other trademarks amba?, arm?, multi- ice?, primecell?, realview?, thumb? of arm limited, uk. autosar? is licensed by autosar development partnership. bluetoot h? of bluetooth sig inc. cat-iq? of dect forum. colossus?, firstgps? of trimble navigation ltd. emv? of emvco, llc (visa ho ldings inc.). epcos? of epcos ag. flexgo? of mi crosoft corporation. flexray? is licensed by flexray consortium. hyperterminal? of hilgraeve incorpor ated. iec? of commission electrot echnique internationale. irda? of infrared data association corporation. iso? of international organization for standardization. matlab? of mathworks, inc. maxim? of maxim in tegrated products, inc. microtec?, nucleus? of mentor graphics corporation. mifare? of nxp. mipi? of mipi alliance, inc. mips? of mips technologies, inc., usa. murata? of murata manufacturing co. om nivision? of omnivision technologies, inc. openwave? openwave systems inc. red hat? red hat, inc. rfmd? rf micro devices, inc. sirius? of sirius sattelite radio inc. solaris? of sun micros ystems, inc. spansion? of spansion llc ltd. symbian? of symbian software limited. taiyo yuden? of ta iyo yuden co. teaklite? of ceva, inc. tektronix? of tektronix inc. toko? of toko kabushiki kaish a ta. unix? of x/open co mpany limite d. verilog?, palladium? of cadence design syst ems, inc. vlynq? of texas in struments incorporated. vxworks?, wind river? of wind river systems, i nc. zetex? of diodes zetex limited. last trademarks update 2009-10-19 pma51xx rf transmitter ask/fsk 315/434/868/915 mhz, embedded 8051 microcontroller, 10-bit adc, 125 khz ask lf receiver revision history: 2010-06-02, revision 2.1 previous revision: 2.0 page subjects (major cha nges since last revision) 101, 86 added note to use library function lfsensitivit ycalibration() for lf carrie r detector threshold level selection.
pma51xx table of contents data sheet 4 revision 2.1, 2010-06-02 table of contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 list of figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 list of tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1 product description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.2 pmax1xx product family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.3 applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.4 key features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.5 pin diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.6 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.7 functional block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2 functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1 operating modes and states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1.1 operating mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.1.2 state description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.1.2.1 init state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.1.2.2 run state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.1.2.3 idle state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 2.1.2.4 power down state (pdwn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.1.2.5 state transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.1.2.6 status of pma5110 blocks in different states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.2 system controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.2.1 wake-up logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.2.1.1 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.2.2 interval timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 2.2.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.3 system configuration registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.3.1 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.4 fault protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.4.1 watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.4.2 vmin detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.4.2.1 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.4.3 brownout detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.4.4 flash memory checksum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.4.5 adc measurement overflow and underflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.5 clock controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.5.1 internal clock divider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.5.2 2 khz rc lp oscillator (low power) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.5.3 12 mhz rc hf oscillator (high frequency) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 2.5.4 crystal oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 2.5.5 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 2.6 memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 2.6.1 rom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.6.2 flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.6.2.1 flash organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.6.2.2 flash protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.6.2.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 table of contents
pma51xx table of contents data sheet 5 revision 2.1, 2010-06-02 2.6.3 ram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 2.6.4 code memory mapped sfrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 2.6.4.1 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 2.6.5 battery buffered data ram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 2.6.6 special function registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 2.7 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 2.7.1 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 2.8 interrupt sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 2.8.1 external interrupts 0 and 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 2.8.2 timer interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.8.3 i 2 c interface interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.8.4 spi interface interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.8.5 lf receiver interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.8.6 rf encoder interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.8.7 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 2.9 rf transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 2.9.1 phase-locked loop (pll) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 2.9.2 voltage-controlle d oscillator (vco) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 2.9.3 power amplifier (pa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 2.9.4 ask modulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 2.9.5 manchester/biphase encoder with bit rate generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 2.9.6 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 2.10 lf receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 2.10.1 lf receiver analog front end configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 2.10.1.1 attenuator (agc) and data filter / data slicer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 2.10.1.2 lf carrier detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 2.10.1.2.1 carrier detector threshold calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 2.10.1.2.2 carrier detector filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 2.10.2 lf receiver on/off timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 2.10.2.1 lf receiver on/off timer calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 2.10.3 lf receiver baseband processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 2.10.3.1 synchronizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 2.10.3.2 bit rate generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 2.10.3.3 lf data decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 2.10.3.4 wake-up pattern detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 2.10.3.5 lf receiver data interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 2.10.3.5.1 8 bit data byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 2.10.3.5.2 serial bit stream data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 2.10.3.5.3 raw data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 2.10.3.5.4 raw carrier detect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 2.10.4 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 2.11 sensor interfaces and data acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 2.11.1 sensor interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 2.11.1.1 two differential highly sensitive in terfaces to external sensors . . . . . . . . . . . . . . . . . . . . . . . 109 2.11.1.2 interface to other signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 2.11.1.3 reference voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 2.11.2 temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 2.11.3 battery voltage monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 2.11.4 analog to digital converter (adc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 2.11.4.1 adc timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 2.11.4.1.1 clock divider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
pma51xx table of contents data sheet 6 revision 2.1, 2010-06-02 2.11.4.1.2 sample time delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 2.11.4.1.3 conversion time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 2.11.4.2 adc configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 2.11.4.2.1 reference- and signal voltage selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 2.11.4.2.2 single ended / differential conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 2.11.4.2.3 comparator signal inversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 2.11.4.2.4 channel gain selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 2.11.4.2.5 full conversion or sub conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 2.11.4.2.6 analog offset correction of the wheatstone bridge signals . . . . . . . . . . . . . . . . . . . . . . . . . 114 2.11.4.3 adc conversion result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 2.11.5 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 2.12 16 bit crc (cyclic redundancy check) generator/checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 2.12.1 byte-aligned crc generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 2.12.2 byte-aligned crc checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 2.12.3 serial bit stream crc generation/checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 2.12.4 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 2.13 8 bit pseudo random number generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 2.13.1 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 2.14 timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 2.14.1 timer 0 and timer 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 2.14.1.1 basic timer operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 2.14.1.2 timer modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 2.14.1.2.1 timer/counter 0/1 - mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 2.14.1.2.2 timer/counter 0/1 - mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 2.14.1.2.3 timer/counter 0/1 - mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 2.14.1.2.4 timer/counter 0/1 - mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 2.14.1.3 timer/counter 0/1 interrupt support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 2.14.1.4 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 2.14.2 timer 2 and timer 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 2.14.2.1 basic timer operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 2.14.2.2 timer modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 2.14.2.2.1 timer 2/3 - mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 2.14.2.2.2 timer 2/3 - mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 2.14.2.2.3 timer 2/3 - mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 2.14.2.2.4 timer 2/3 - mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 2.14.2.2.5 timer 2/3 - mode 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 2.14.2.2.6 timer 2/3 - mode 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 2.14.2.2.7 timer 2/3 - mode 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 2.14.2.2.8 timer 2/3 - mode 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 2.14.2.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 2.15 general purpose input/output (gpio) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 2.15.1 gpio port configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 2.15.2 spike suppression on input pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 2.15.3 external wake-up on pp1-pp4 and pp6- pp9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 47 2.15.4 alternative port functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 2.15.5 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 2.16 i 2 c interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 2.16.1 module structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 2.16.2 i 2 c programming instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 2.16.2.1 slave mode sequenc e (polling mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 2.16.2.2 slave mode sequence (interrupt mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
pma51xx table of contents data sheet 7 revision 2.1, 2010-06-02 2.16.2.3 general call sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 2.16.2.4 master mode sequence (polling mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 2.16.2.5 master mode sequence (interrupt mo de) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 2.16.3 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 2.17 spi interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 2.17.1 spi functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 2.17.1.1 full-duplex operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 2.17.1.2 half-duplex operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 2.17.1.3 data modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 2.17.2 module structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 2.17.3 interrupt support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 2.17.4 spi programming instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 2.17.4.1 slave mode sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 2.17.4.2 master mode sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 2.17.5 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 2.18 programming mode operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 2.18.1 flash write line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 2.18.2 flash read line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 2.18.3 flash erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 2.18.4 flash check erase status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 2.18.5 flash set code lock (lockbyte 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 2.18.6 flash set user data sector lock (l ockbyte 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 2.18.7 read status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 2.19 debug mode operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 2.19.1 rom debug function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 2.19.2 debug mode commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 2.19.2.1 set sfr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 2.19.2.2 read sfr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 2.19.2.3 set idata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 2.19.2.4 read idata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 2.19.2.5 set xdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 2.19.2.6 read xdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 2.19.2.7 set pc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 2.19.2.8 read pc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 2.19.2.9 single step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 2.19.2.10 run interruptible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 2.19.2.11 run until breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 3 reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 3.1 electrical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 3.1.1 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 3.1.2 operating range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 3.1.3 product characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 3.1.3.1 temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 3.1.3.2 battery sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 3.1.3.3 supply currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 3.1.3.4 rf-transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 3.1.3.5 lf receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 3.1.3.6 crystal oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 3.1.3.6.1 crystal oscillator recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 3.1.3.7 12 mhz rc hf oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 3.1.3.8 2 khz rc lp oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
pma51xx table of contents data sheet 8 revision 2.1, 2010-06-02 3.1.3.9 interval timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 3.1.3.10 power on reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 3.1.3.11 vmin detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 3.1.3.12 6k flash code memory data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 3.1.3.13 2 times 128 byte flash data memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 3.1.3.14 adc interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 3.1.3.15 digital i/o pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 3.1.4 matching network for the po wer amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 4 register overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 5 package outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 01
pma51xx list of figures data sheet 9 revision 2.1, 2010-06-02 figure 1 pin-outs of pma51xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 figure 2 pma51xx block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 3 operating mode selection of the pma51xx after reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 figure 4 normal mode - state transition diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 5 power on reset - operating mode selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 6 block diagram of the system controlle r. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 figure 7 interval timer block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 figure 8 calculation of interval timer period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 figure 9 pma5110 clock concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 figure 10 formulas for crystal selection dependent of rf bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 figure 11 crystal oscillator and f sk-modulator block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 figure 12 memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 figure 13 naming convention for register descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 figure 14 rf transmitter block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 figure 15 manchester/biphase encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 figure 16 diagram of the different rf encoder modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 figure 17 calculation of rf bit rate timer value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 figure 18 lf receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 figure 19 lf receiver afe block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 figure 20 lf receiver afe block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 figure 21 lf receiver carrier detector hold time behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 figure 22 carrier detector threshol d calibration timing (with ?freeze?) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7 figure 23 lf receiver carrier dete ctor filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 figure 24 calculation of time base for lf re ceiver on/off timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 figure 25 calculation of on time for lf receiver on/off timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 figure 26 calculation of off time for lf receiver on/off timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 figure 27 lf receiver baseband . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 figure 28 lf receiver baseband configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 figure 29 calculation of lf receiver bit rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 figure 30 lf receiver data decoder schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 figure 31 block diagram of the sensor interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 figure 32 wheatstone bridge sensor connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 figure 33 external sensor use channel 2 as reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 figure 34 adc timing diagram (standard conversion). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 figure 35 adc frequency calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 figure 36 adc sample time delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 figure 37 generation of adc clock and the sample time signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 figure 38 calculation of the adc conversion time using full conv ersion . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 figure 39 calculation of the adc conversion time using sub conversion . . . . . . . . . . . . . . . . . . . . . . . . . . 114 figure 40 adc offset voltage calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 figure 41 calculation of single ended conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 figure 42 calculation of differential conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 figure 43 crc (cyclic redundancy check) gene rator/checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 figure 44 crc (cyclic redundancy check) ge nerator/checker example . . . . . . . . . . . . . . . . . . . . . . . . . 123 figure 45 example of serial crc generation/checking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 figure 46 timer/counter 0, mode 0, 13-bit timer/counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 figure 47 timer/counter 0, mode 2: 8-bit timer/counter with au to-reload . . . . . . . . . . . . . . . . . . . . . . . . . 130 figure 48 timer/counter 0, mode 3: two 8-bit timers/counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 figure 49 timer 2/3 - mode 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 list of figures
pma51xx list of figures data sheet 10 revision 2.1, 2010-06-02 figure 50 timer 2/3 - mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 figure 51 timer 2/3 - mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 figure 52 timer 2/3 - mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 figure 53 timer 2/3 - mode 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 figure 54 timer 2/3 - mode 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 figure 55 timer 2/3 - mode 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 figure 56 timer 2/3 - mode 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 figure 57 logical description of external wake-ups and inte rnal pull-up/pull-down resistors . . . . . . . . . . . . 148 figure 58 i 2 c module structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 figure 59 calculation of i 2 c baud rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 figure 60 spi principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 figure 61 full-duplex configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 figure 62 half-duplex configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 figure 63 spi data modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 figure 64 spi module structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 figure 65 calculation of spi baud rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 figure 66 legend for i 2 c-commands in programming mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 figure 67 flash write line command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 figure 68 flash read line command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 figure 69 flash erase command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 figure 70 flash erase: sector byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 figure 71 flash check erase status command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 figure 72 flash check erase status: sector byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 figure 73 flash check erase status: status byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 figure 74 flash set lockbyte 3 command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 figure 75 read status command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 figure 76 read status: status byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 figure 77 legend for i 2 c communication in debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 figure 78 set sfr command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 figure 79 read sfr command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 figure 80 set idata command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 figure 81 read idata command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 figure 82 set xdata command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 figure 83 read xdata command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 figure 84 set pc command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 figure 85 read pc command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 figure 86 single step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 figure 87 run interruptible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 figure 88 run until breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 figure 89 matching network for the power amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 figure 90 package outline pg-tssop-38. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
pma51xx list of tables data sheet 11 revision 2.1, 2010-06-02 table 1 pma51xx and pma71xx fam ily . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 table 2 abbreviations for pin type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 3 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 4 operating mode selection after reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 table 5 state transitions in normal mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 table 6 status of important pma5110 blocks in different states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 table 7 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 8 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 9 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 table 10 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 11 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 12 special function registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 table 13 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 14 interrupt vector locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 table 15 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 table 16 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 table 17 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 table 18 selection of the gain factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 table 19 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 table 20 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 table 21 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 table 22 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 table 23 gpio port configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 table 24 i/o port 1 - alternative functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 table 25 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 table 26 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 table 27 registers overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 table 28 flash erase: sector byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 table 29 flash check erase status: sector byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 table 30 flash check erase status: status byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 table 31 read status: status byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 table 32 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 table 33 operating range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 table 34 temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 table 35 battery sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 table 36 supply currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 table 37 rf transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 table 38 lf receiver, v bat = 2.1-3.6v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 table 39 crystal oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 table 40 ndk crystal oscillator re commendation for pma51xx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 table 41 12 mhz rc hf oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 table 42 2 khz rc lp oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 table 43 interval timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 table 44 power on reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 table 45 vmin detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 table 46 6k flash code memory data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 table 47 2 times 128 byte flash data memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 table 48 adc interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 table 49 digital i/o pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 list of tables
pma51xx list of tables data sheet 12 revision 2.1, 2010-06-02 table 50 values of the matching network for the power amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6 table 51 register overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
pma51xx product description data sheet 13 revision 2.1, 2010-06-02 1 product description 1.1 overview the smartlewis? mcu family compri ses an ask/fsk multiband transmitter for the sub 1ghz ism frequency bands with an embedded 8051 microcontroller as base func tionality. additionally, the highly integrated single chip family has internal sensors and optional peripheral functions like an analog to digital converter (adc) and a lf receiver on chip. the operating voltage range of 1.9 to 3.6 v, the high efficiency power amplifier and an advanced power control system make the pma51xx family ideal for battery operated applications where low current consumption is necessary. the pin-compatible pr oduct family requires only a few external components and is the basis for flexible wireless control transmitte r platforms enabling applications for different frequency bands, output power levels and feature sets based on onl y one design - just through different mounting options. the multiband ask/fsk transmitter for 315/434/868/915 mhz frequency bands contains a fully integrated vco, a pll synthesizer, an ask/fsk modulator and a high e fficiency power amplifier wit h selectable output power. fine tuning of the center frequency can be done by an on-chip capacitor bank. the integrated microcontroller is instru ction set compatible to the standard 8051 processor. it can be clocked with an internal 12 mhz rc hf or an exte rnal oscillator. 6 clock cycles are need ed for the execution of one instruction. this results in 2 mips 1) when using the 12 mhz rc hf oscillator. th e microcontroller is equipped with various peripherals like a hardware manchester/biphase encode r/decoder and a crc generator/checker. to store the microcontroller application program code, a 6 kbyte on- chip flash memory is inte grated. this flash memory is also used for saving the unique id-number of the chip . a comprehensive software function library with high level commands in rom allows easy and fast time to market development. the library provides many powerful functions like aes-encryp tion and eeprom emulation, what help s to reduce the user code size. additional peripherals are an integr ated temperature sensor and a low battery voltage sensor. measurements via these internal sensors and reading signals from analog inpu ts (e.g. from an external analog sensor) are performed under software control. depending on the product variant, pma51xx offers an embed ded multi-channel 10-bit analog to digital converter with flexible high-gain settings as interface for a broad variety of analog sensors and an integrated 125 khz lf receiver. the lf receiver enabl es wireless wake-up in battery operated applications with ultra-long- lifetime or even contactless co nfiguration of the device. 1) mips .. million instructions per second
pma51xx product description data sheet 14 revision 2.1, 2010-06-02 1.2 pmax1xx product family the pmax1xx product family contains various product variants listed in table 1 ?pma51xx and pma71xx family? on page 14 . note: this data sheet documents the full feature set of the pma5110, which has the full feature set of the pma51xx product family available. when using the pma 51xx family data sheet for product variants other than the pma5110, please keep in mind that not all of th e features and data described are relevant for these other members of the family. following table shows the functional differences of the pma51xx and pma71xx family members: the pma51xx products are supporting a temperature range from -40 to +125c and are full automotive qualified, tailored for automotive applications and industrial applications in harsh environment. additionally, infineon offers the pma71xx product family with a temperature range of -40 to +85c, tailored for consumer and industrial applications. 1.3 applications ? remote keyless entry (rke) ? security and alarm systems requiring high quality standards ? industrial controls in harsh environments ? wireless sensing 1.4 key features general: ? supply voltage range from 1.9 v up to 3.6 v ? operating temperature range from -40 to +125c ? low power down current consumption < 0.6 a ? advanced power control system for lowest system cu rrent consumption, switching the microcontroller or transmitter part into power down or idle state whenever possible ? pg-tssop-38 package transmitter: ? multiband rf transmitter for ism frequency band 315/434/868/915 mhz ? sw configurable transmit power of 5/8/10 dbm into 50 ohm load ? selectable transmit data rates up to 32 kbit/s (64 kchips/s) for the temperature range -40c to +85c and 20 kbit/s (40 kchips/s) for temperatures above +85c ? rf encoder supporting manchester-, biph ase- or nrz coded data (chip mode) table 1 pma51xx and pma71xx family product name ordering code rf transmitter embedded 8051 mcu adc 125 khz lf receiver automotive qualified pma7110 sp000430596 x x x x no pma7107 sp000450412 x x x no pma7106 sp000450410 x x x no pma7105 sp000450408 x x no pma5110 sp000373573 x x x x yes PMA5105 sp000463432 x x yes
pma51xx product description data sheet 15 revision 2.1, 2010-06-02 ? ask/fsk modulation capability ? fsk frequency deviation up to 100 khz ? fully integrated vco and pll synthesizer ? crystal oscillator tuning on chip microcontroller: ? 8051 instruction set compatible microcontroller (cycle-optimized) ? 6 kbyte free programmable flash code memory ? 2 blocks of 128 byte flash data memory, alternatively usable as 31 byte emulated eeprom ? rom embedded software function library with preprogr ammed functions and high level commands for easy programming ? 128 bit aes (advanced encryption standard) embedded as software function ? 256 bytes ram (128 bytes configurable to keep content in power down state) ? 16 bytes xdata memory (supplied in power down state) ? 2 mips when using internal 12 mhz rc hf oscillator peripherals: ? 125 khz ask lf receiver ? lf receiver data rate for typical 3.9 kbit/s (manchester/biphase coded) ? 10 bit adc with 3 pair differential channels and flexible hi gh-gain settings (e.g. as inputs for external sensors) ? 10 free programmable bidirectional general purpose i nput output pins (gpio) with on-chip pull-up/pull-down resistors. 8 of them ha ve wake-up functionality ? on-chip temperature sensor ? on-chip voltage sensor for low battery voltage measurement ? brownout detector ? manchester/biphase encoder and decoder ? 16 bit hardware crc generator ? 8 bit pseudo random number generator ?i 2 c bus interface ? spi bus interface miscellaneous: ? watchdog timer ? 4 independent 16 bit timers ? wake-up from power down state po ssible by different sources: in terval timer, watchdog timer, lf receiver or external wake-up sources connected to gpios ? on-chip debugging via i 2 c interface ? 48 bit unique-id on chip
pma51xx product description data sheet 16 revision 2.1, 2010-06-02 1.5 pin diagram figure 1 pin-outs of pma51xx v2n (sens) vm2 (sens) v2p (sens) rd (sens) gndc vdda vddd vreg lf xlf amux2 amux1 xgnd xtal xtalcap tme mse pp9/ext_int0/wu7/t1count pp8/wu6/t1gate pma5110 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 vdd (sens) v1n (sens) vm1 (sens) v1p (sens) gndb gnda vbat pgnd pa gnd pp2/txdataout/wu1/t3count pp1/i2c_sda/wu0/t0count/opmode2 pp0/i2c_scl/t0gate/opmode1 pp3/spi_cs/wu2 pp4/spi_miso/wu3 pp5/spi_mosi pp6/spi _clk/wu4 xreset pp7/ext_int1/wu5 pins not used for PMA5105
pma51xx product description data sheet 17 revision 2.1, 2010-06-02 1.6 pin description abbreviations standard abbreviations for i/o are shown in table 2 . table 2 abbreviations for pin type abbreviations description i standard input-only pin. digital levels. i/o i/o is a bidirectional input/output signal. ai input. analog levels. ao output. analog levels. ai/o input or output. analog levels. pwr power gnd ground table 3 pin description pin no. name pin type buffer type function 1 vdd_sens ao supply_output sensor bridge positive supply output of v reg during measurement. 2 v1n_sens ai analog channel 6, high-gain adc input negative input connect to sensor bridge. output of wheatstone bridge sensor vbat vreg voltage regulator gnda gnda vdd (sens) gnda switch vdda 500 v1n 2k gnda
pma51xx product description data sheet 18 revision 2.1, 2010-06-02 3 vm1_sens gnd supply channel 6, high-gain adc input sensor bridge negative supply. same voltage as chip gnd. 4 v1p_sens ai analog channel 6, high-gain adc input positive input connect to sensor bridge. output of wheatstone bridge sensor 5 gndb gnd supply ground 6 gnda gnd supply ground table 3 pin description (cont?d) pin no. name pin type buffer type function vdda vm1 gnda vdda 500 v1p 2k gnda gndb xgnd pgnd gnda xgnd pgnd
pma51xx product description data sheet 19 revision 2.1, 2010-06-02 7vbat pwrsupply battery supply voltage regulators 8 pgnd gnd supply power amplifier ground double bond 9pa aoanalog power amplifier output stage 10 gnd gnd supply(analog) ground table 3 pin description (cont?d) pin no. name pin type buffer type function vbat vreg vo lta g e regulator gnd xgnd pgnd pa pgn d pgn d 10 gnd 100
pma51xx product description data sheet 20 revision 2.1, 2010-06-02 11 pp2/txdataout/ wu1/t3count/ i/o digital pp2 -) serial output of manchester / biphase encoded data. -) gpio -) external wake-up source 1 -) clock source for timer 3 -) internal, switch able pull-up/pull- down. 12 pp1/i2c_sda/ wu0/t0count/ opmode2 i/o digital pp1 -) i2c bus interface data -) gpio -) external wake-up source 0 -) clock source for timer 0 -) select operation mode -) internal, switch able pull-up/pull- down. 13 pp0/i2c_scl/ t0gate/opmode1 i/o digital pp0 -) i2c bus interface clock -) gpio -) external enable for timer 0 -) select operation mode -) internal, switch able pull-up/pull- down. table 3 pin description (cont?d) pin no. name pin type buffer type function ppi 2 t3count serial output of rf encoder data tristate 500 data pp2 vbat gnd vbat pps 2 co mbina ton al lo gic pullup pulldown tristate 250k vbat gnd ppo 2 ppd 2 combinatonal lo gic ppi 1 i2cd i2cen data tristate 500 data pp1 vbat gnd vbat pps 1 co mbina ton al lo gic pullup pulldown tristate 50 k vbat gnd ppo 1 ppd 1 combinatonal lo gic ppi 0 i2c_scl i2cen data tristate 500 data pp0 vbat gnd vbat pps 0 co mbina ton al lo gic pullup pulldown tristate 50 k vbat gnd ppo 0 ppd 0 combinatonal lo gic
pma51xx product description data sheet 21 revision 2.1, 2010-06-02 14 pp3/spi_cs/wu2 i/o digital pp3 -) spi bus interface chip select -) gpio -) external wake-up source 2 -) internal, switch able pull-up/pull- down. 15 pp4/spi_miso/ wu3 i/o digital pp4 -) spi bus interface master in slave out -) gpio -) external wake-up source 3 -) internal, switch able pull-up/pull- down. 16 pp5/spi_mosi i/o digital pp5 -) spi bus interface master out slave in -) gpio -) internal, switch able pull-up/pull- down. table 3 pin description (cont?d) pin no. name pin type buffer type function ppi 3 spi _cs data tristate 500 data pp3 vbat gnd vbat pps 3 co mbina ton al lo gic pullup pulldown tristate 250k vbat gnd ppo 3 spien ppd 3 combinatonal lo gic ppi 4 spi _miso spien data tristate 500 data pp4 vbat gnd vbat pps 4 co mbina ton al lo gic pullup pulldown tristate 250k vbat gnd ppo 4 ppd 4 combinatonal lo gic ppi 5 spi _ mosi spien data tristate 500 data pp5 vbat gnd vbat pps 5 co mbina ton al lo gic pullup pulldown tristate 250k vbat gnd ppo 5 ppd 5 combinatonal lo gic
pma51xx product description data sheet 22 revision 2.1, 2010-06-02 17 pp6/spi_clk/wu4 i/o digital pp6 -) spi bus interface clock -) gpio -) external wake-up source 4 -) internal, switch able pull-up/pull- down. 18 xreset i digital external reset low active 19 pp7/ext_int1/wu5 i/o digital pp7 -) gpio -) external interrupt source 1 -) external wake-up source 5 -) internal, switch able pull-up/pull- down. table 3 pin description (cont?d) pin no. name pin type buffer type function ppi 6 spi _ clk spien data tristate 500 data pp6 vbat gnd vbat pps 6 combi natonal logi c pullup pulldown tristate 250k vbat gnd ppo 6 ppd 6 combi nato nal lo gi c 50k 500 xreset reset vba t ppi 7 data tristate 500 data pp7 vbat gnd vbat pps 7 co mbina ton al lo gic pullup pulldown tristate 250k vbat gnd ppo 7 ppd 7 combinatonal lo gic
pma51xx product description data sheet 23 revision 2.1, 2010-06-02 20 pp8/wu6/t1gate i/o digital pp8 -) gpio -) external wake-up source 6 -) external enable for timer 1 -) internal, switch able pull-up/pull- down. 21 pp9/ext_int0/wu7 /t1count i/o digital pp9 -) gpio -) external interrupt source 0 -) external wake-up source 7 -) clock source for timer 1 -) internal, switch able pull-up/pull- down. 22 mse i digital mode select enable high active, set to gnd in normal mode. table 3 pin description (cont?d) pin no. name pin type buffer type function ppi 8 data tristate 500 data pp8 vbat gnd vbat pps 8 co mbina ton al lo gic pullup pulldown tristate 250k vbat gnd ppo 8 ppd 8 combinatonal lo gic ppi 9 data tristate 500 data pp9 vbat gnd vbat pps 9 co mbina ton al lo gic pullup pulldown tristate 250k vbat gnd ppo 9 ppd 9 combinatonal lo gic 250k 500 mse mse_i vbat
pma51xx product description data sheet 24 revision 2.1, 2010-06-02 23 tme i digital test mode enable, n.a. for normal application has to be set to gnd in normal mode 24 xtalcap ai analog crystal osci llator load capacitance 25 xtal ai analog crystal oscillator input 26 xgnd gnd supply crystal oscillator ground table 3 pin description (cont?d) pin no. name pin type buffer type function 250k 500 tme tme_i vbat xtalcap xgn d xgn d 10 vddd xgn d 500 xgn d xtal 0.9vdc bypass gnd xgnd pgnd
pma51xx product description data sheet 25 revision 2.1, 2010-06-02 27 amux1 ai analog additional differential adc standard input1 for external sensor connect to gnd if not use. 28 amux2 ai analog additional differential adc standard input2 for external sensor connect to gnd if not use. 29 xlf ai analog differential lf receiver input2 125khz input. 30 lf ai analog differential lf receiver input1 31 vreg ao supply internal voltage regulator output connect to decoupling capacitor (c bcap =100 nf) regulated power supply. table 3 pin description (cont?d) pin no. name pin type buffer type function vdda gnd 500 gnd amux1 adc channel 2 input 1 vdda gnd 500 gnd amux2 adc channel 2 input 2 xlf gnd 50 15k xlf_i lf gnd 50 15k lf_i vbat vreg vo lta g e regulator gnd gnd
pma51xx product description data sheet 26 revision 2.1, 2010-06-02 32 vddd pwr supply digital supply 33 vdda pwr supply analog supply 34 gndc gnd supply ground 35 rd_sens ai analog diagnostic resistor use only by having diagnostic resistor on sensor bridge for high- gain adc input, otherwise no connection 36 v2p_sens ai analog channel 7, high-gain adc input positive input connect to sensor bridge. output of wheatstone bridge sensor. table 3 pin description (cont?d) pin no. name pin type buffer type function 1.6 ...2.5v vddd gnd digital core vdda gnd analog co re gndc xgnd pgnd vd d a 500 rd 2k 100k vd d a 500 v2p 2k
pma51xx product description data sheet 27 revision 2.1, 2010-06-02 37 vm2_sens gnd supply channel 7, high-gain adc input sensor bridge negative supply. same voltage as chip gnd. 38 v2n_sens ai analog channel 7, high-gain adc input negative input connect to sensor bridge. output of wheatstone bridge sensor. table 3 pin description (cont?d) pin no. name pin type buffer type function vd d a 500 v2p 2k vdd a 500 v2n 2k
pma51xx product description data sheet 28 revision 2.1, 2010-06-02 1.7 functional block diagram figure 2 pma51xx block diagram diff. high sensitive input 1 manchester/biphase coder input multiplexer t r adc reference voltage & offset dac adc state machine 8051 microcontroller internal reference voltage internal temperature sensor 12 kb rom 256 b ram crc generator general purpose input/output (gpio, i2c, spi, wu?) brownout detector vmin detector special function registers 2khz rc lp oscillator 12mhz rc hf oscillator watch dog timer timer interval timer timer calibration clock controller reset wake up power mgm power amplifier crystal oscillator fsk modulator ask modulator rf-pll 125khz receiver carrier detector digital receiver 6 kb flash pa pgnd xgnd xtalcap xtal lf xlf pp0 pp1 pp2 pp9 ... ... diff. high sensitive input 2 xreset interrupt controller mse tme v2p v2n amux1 gnd vbat vreg voltage regulators low power v-reg low dropout v-reg prng 1) vdda vddd diff. standard input v1p v1n bridge supply vdd(sens) amux2 adc 1) prng .. pseudo random number generator system controller lf receiver rf transmitter
pma51xx functional description data sheet 29 revision 2.1, 2010-06-02 2 functional description 2.1 operating modes and states the pma51xx can be operated in three different operating modes. ?normalmode ? programming mode ? debug mode 2.1.1 operating mode selection figure 3 operating mode selection of the pma51xx after reset the mode select is entered after the system reset expi res. the levels on the i/o pins pp0 and pp1 are latched by the system controller and read by the operating sys tem to determine the mode of operation of the device according to table 4 ?operating mode selection after reset? on page 30 . figure 3 ?operating mode selection of the pma51xx after reset? on page 29 shows how the mse and lockbyte 2 are also checked to determine the operating mode. the mse, pp0, and pp1 levels must not change after reset release during the whole t mode period (see figure 5 ?power on reset - operating mode selection? on page 31 ). mode select programming mode mse = 1 pp0=0 pp1=0 mse = 1 pp0=1 pp1=0 lockbyte 2 not set mse = 1 pp0=0 pp1=1 lockbyte 2 not set test mode tme = 1 por, xreset software reset brown-out event system reset * tme = 0 mse = 0 or mse = 1 lockbyte 2 set or mse = 1 pp0=1 pp1=1 lockbyte 2 not set test mode debug mode normal mode *note: whenever tme is set to high the current operation mode is left and t est mode is entered , regardless if there was a reset event or not ! don?t use don?t use pp0 pp1 1 1 1 0 0 1 or or or
pma51xx functional description data sheet 30 revision 2.1, 2010-06-02 note: flash protection is done by hardware. figure 4 normal mode - state transition diagram for low power consumption the pma51xx supports different operating states - run state, idle state and power down state. the device operation in these states is as described below. table 4 operating mode selection after reset tme mse lockbyte 2 pp0 pp1 operating mode device control hardware restrictions 0 0 x x x normal cpu executing from 4000 h flash write access depends on lockbyte setting 01x 00test 1) 1) do not use 0 1 not set 0 1 programming programming mode handler none 0 1 set 0 1 normal cpu executing from 4000 h flash write restriction 2) 2) flash programming and erasing is possible via library functions 0 1 not set 1 0 debug debug mode handler flash write disabled 0 1 set 1 0 normal cpu executing from 4000 h flash write restriction 2) 0 1 x 1 1 normal cpu executing from 4000 h flash write restriction 2) pdwn run wd pe wu mse = 0 or mse = 1 pp0=1|1|0 pp1=1|0|1 lockbyte 2 set or mse = 1 pp0=1 pp1=1 lockbyte 2 not set mode select states run - run application pdwn - powerdown idle - cpu clock stopped idle transitions wu - wakeup pe - powerdown enable wd - watchdog iflg - idle flag rs - resume irq - interrupt request reti- return from interrupt init rs iflg irq reti idle wd
pma51xx functional description data sheet 31 revision 2.1, 2010-06-02 transitions between these states are ei ther controlled by application softwa re or managed automatically by the system controller. ? pdwn: power down (cpu and peripherals are not supplied) ? idle: cpu clock stopped, pe ripherals are still running figure 5 power on reset - oper ating mode selection during the time interval t mode , the levels of pp0, pp1 and mse are read, and the operation mode of the device determined according to table 4 ?operating mode selection after reset? on page 30 . the levels on these pins must be stable during the whole t mode period. the pma51xx's power-on reset circuit is activated if v reg rises above v por . the internal blocks are held in reset state until vreg e xceeds the level of v thr . when this reset state is re leased, a further time of t mode is needed for reading the levels on pp0, pp1, and mse. after t mode has elapsed, the device starts operation in the selected mode. note: see table 44 ?power on reset? on page 193 for details on power-on reset characteristics. vreg v por v thr reset (internal ) t por pp0, pp1 t mode
pma51xx functional description data sheet 32 revision 2.1, 2010-06-02 2.1.2 state description 2.1.2.1 init state this is a transient state after the system reset, which is entered when the settings of pp0, pp1, mse, tse, and the lockbyte 2 lead to normal mode (please refer to table 4 ?operating mode selection after reset? on page 30 ). it is also a transient state in normal mode before the state change between pdwn and run or when a watchdog reset occurs in idle or run state. in init state, the relevant sf rs get reset to their default values. then the application program in flash is started at 4000 h and the device enters run state. 2.1.2.2 run state in the run state, the cpu executes the flash code. peripherals are on or off according to the application program and the watchdog timer is active. all wake-up ev ents except in extwufs are ignored in the run state but the corresponding wake-up flags get set and can be re ad and cleared. activity on the external wake-up pins can be monitored in the corresponding sfr p1in or p3in. 2.1.2.3 idle state in the idle state, the cpu clock is disabled but peripherals (timers, adc, rf-tx, lf-rx, spi and i 2 c interface) continue normal operation. if a resume event occurs, the run state is reentered immediately. the watchdog timer is active and reset automatically when entering id le state. all wake-up events are ignored in idle state, but the corresponding flags are set if a wake-up occurs and can be evaluated once the device returns to the run state. if a peripheral requests an interrupt or an external interrup t occurs, the idle state is left for run state, the interrupt service routine is executed, and on the next reti (return from interrupt) instruction the idle state is re-entered in case no resume event has occurred in between. resume events the resume source can be identified by reading the re sume event flag, ref. resume events may occur on the following events: ? rf transmitter buffer empty ? rf transmission finished ? lf receiver buffer full ? timer 2 underflow ? a/d conversion finished ? 2 khz rc lp oscillator calibration finished ? clock change from 12 mhz rc hf os cillator to crystal oscillator finished interrupt requests interrupts during idle state may be requested by embedded peripherals or external events. ? external (pin) interrupt 0/1 ? timer 0/1/2/3 ?i2c interface ? spi interface ? lf receiver ? manchester/biphase encoder
pma51xx functional description data sheet 33 revision 2.1, 2010-06-02 2.1.2.4 power down state (pdwn) in the power down state, the cpu and its peripherals are powered down. the system controller, the xdata memory, and optionally the lower 128-byte internal ram are kept powered. furthermore some sfrs are kept powered in the powe r down state (see table 12 ?special function registers overview? on page 61 ). the lf receiver will be switched on peri odically if the lf on/off timer is enabled. wake-up flags are cleared automatically when going to power down. wake-up events a wake-up event occurs when a peripheral or external source causes the system to power up again. the wake- up source can be identified by reading sfrs wuf a nd extwuf. wake-up events may occur on following events: ? at least one of the external wake-up pins changed its state to the configured one ? interval timer underflow occurred ? lf receiver carrier detected ? lf receiver pattern matched ? lf receiver sync matched 2.1.2.5 state transitions with reference to figure 4 ?normal mode - state transition diagram? on page 30 , the following state transitions can occur: table 5 state transitions in normal mode state transition description run state => idle state (iflg) the application program sets sfr bit cfg0.5[idle] 1) to enter idle state. (see configuration register 0 on page 46 ) note: if no peripheral that can create a resume event is active, idle state will not be entered and the applicatio n will continue operation. 1) it is mandatory that the instruction setting th e cfg0.5[idle] is followed by a nop instruction. idle state => run state (rs, irq) rs: a peripheral unit (timer 2, adc, rf transmitter, lf receiver, system clock source switch) creates a resume event. t he application continue s with the instruction after the idle bit setting (see resume event flag register on page 39 ). irq: an interrupt occurs. this interrupt allows the immediate execution of the interrupt service routine. with the return from in terrupt instruction, the device returns to idle state if no resume event has been generated in between. idle state => init state (wd 2) ) run state => init state (wd) 2) wd .. watchdog timer if the watchdog timer elapse d, the application will restart by initialization of some sfrs. only the sfrs which are not supplie d in power down state are initialized after the watchdog timer elapsed (see table 12 ?special function registers overview? on page 61 ). the watchdog timer wake-up may be identified by wake- up flag register on page 40 run state => powerdownstate (pdwn) entering this state is always software -controlled by setting cfg0.7[pdwn]. the application program calls a library function to enter power down state whenever needed. powerdownstate => init state a wake-up event will restart the application and se t the sfr wuf resp. extwuf accordingly. the watchdog time r is re-initialized (see external wake-up flag register on page 37 ). init state => run state this state change is initia ted automatically by the system controller as soon as init state is finished.
pma51xx functional description data sheet 34 revision 2.1, 2010-06-02 wake-up duration from power down state through init st ate to run state typically lasts 1410 s. the time is the sum of the time for the power supply to get stable (100 s), the startup ti me of the oscillator (1150 s) and the time for the operating system to get initialized (160 s @ 12-mhz cpu clock). 2.1.2.6 status of pma5110 bl ocks in different states depending of the actual state in normal mode, the intern al blocks of the pma5110 are active, inactive or have no supply to reduce power consumption. the next table gi ves an overview of the various blocks in the different device states. note: active : block is powered, is active and keeps its register contents. power consumption is high inactive : block is powered, cannot be used, but keeps it s register contents. power consumption is low no supply : block is not powered, power consumption is very low. table 6 status of important pma5110 blocks in different states peripheral unit run state idle state power down state power-on reset active active active brown-out detector active active inactive; power down low-power voltage supply active active active system controller active active active wake-up logic active active active cpu active inactive no supply non-volatile sfrs (system controller) active inactive; content not lost inactive; content not lost manchester/biphase coder, timer software selectable softw are selectable no supply peripheral modules: crc, mlfsr software selectable inactive no supply peripheral modules: i2c, spi, adc software selectable softw are selectable no supply watchdog timer active active no supply ram lower 128 byte active inacti ve; content not lost selectable power down (content lost) or inactive (content not lost) ram upper 128 byte active inactive; cont ent not lost no supply; content lost xdata 16 byte active inactive; content not lost inactive; content not lost flash memory active inactive; content not lost no supply; content not lost crystal oscillator software select able software sele ctable no supply 2 khz rc oscillator active active active 12 mhz rc hf oscillator software selectable software se lectable power down (r emark: automatically enabled after carrier detect wu) interval timer active active active lf receiver software selectable so ftware selectable software selectable rf transmitter software selectab le software select able no supply vmin detector software selectable software selectable no supply
pma51xx functional description data sheet 35 revision 2.1, 2010-06-02 2.2 system controller while the microcontroller controls pma51xx in the run s tate, the system controller takes over control in the power down state and the idle state. the system controller handles the system cl ock, wake-up events, and system resets. figure 6 block diagram of the system controller 2.2.1 wake-up logic one of the key elements within the syst em controller is the wake-up logic, which is responsible for transitions from the power down state to th e run state via the init state. the difference between reset and wake-up ? reset - either via software re set, brownout reset, power-on reset or reset pin, the digital circuit is reset. program execution starts at address 0000 h to perform reset initialization ro utines (including operation mode selection), and will jump to the flash at address 4000 h in normal mode to execute the application program. ? wake-up - only the microcontroller and its peripheral units are reset. program execut ion starts at address 0000 h to perform wake-up initialization ro utines (for evaluating the wake-u p source), and jumps to the flash at 4000 h to execute the application program. sensor interface wakeup logic power management system controller sfr registers delay timer reset handler timer calibration unit lf on/off timer interval timer io-port control clock controller i/o port clock divider intern por rf-transmitter lf-receiver resume wakeup wakeup power supply adc resume on/off timer wakeup en en system clock system reset 12 mhz rc-hf- oscillator 2khz rc-lp- oscillator interval timer crystal oscillator temp. sensor v bat sensor 2x high sensitive differential 1x standard differential analog interfaces rng 1) timer 2 resume resume resume resume 1 ) 8 bit pseudo random num ber generator
pma51xx functional description data sheet 36 revision 2.1, 2010-06-02 wake-up event handling whenever a wake-up event occurs, the pma51xx leaves the power down s tate and enters the run state to execute the application code. this tr ansition can be initiated by various sources. the wake-up source can be identified by reading sfr wuf and sfr extwuf, wh ich are cleared on read out. on every wake-up sfr bit dsr.1[wup] is set to 1 b . a wake-up source can be enabled or disabled by setting the appropriate bits in sfr wum and sfr extwum. for security reasons, the interval timer wake-up cannot be masked and the interval timer cannot be disabled in normal mode. the wake-up source (except the watchdog timer) is availa ble during the whole run state. if an additional wake- up event occurs during the r un state, the appropriate flag will be set, bu t the device won?t be forced through init state. watchdog timer event a watchdog timer event occurs after the watchdog time r has elapsed. the watchdog ti mer, which is only active in run and idle state cannot be masked. see chapter 2.4.1 for details about the watchdog timer. lf receiver wake-up event the lf receiver wake-up can be enabled by setting one of these bits: ? sfr bit wum.5 [lfcd] or ? sfr bit wum.4 [lfsy] or ? sfr bit wum.3 [lfpm1] and/or sfr bit wum.2 [lfpm0] the wake-up source can be read in the sfr wuf. note: the lf receiver has to be configured appr opriately for the particular wake-up modes. see chapter 2.10.4 for details. external wake-up event i/o port pp1-pp4 and pp6-pp9 can be configured to wake up the pma51xx from the power down state by an external source. note: pp1-pp4 and pp6-pp9 have to be configured according to chapter 2.15.3 for this feature. the appropriate bits in sfr extwuf are only set when the pma51 xx leaves the power down state. in run state and idle state these bits are not set. interval timer wake-up event when the interval timer elapses, a wake-up event is generated and the power down state is left. the wake- up can be identified by the application software reading sfr bit wuf.0 [itim]. the interval timer is reloaded automatically with actual va lues from register itpr and immediately restarted, so the interval timer is even working in the run state. note: the interval timer is not maskab le in normal mode, so the application will get interval timer wake-up events periodically. if these wake-up events occur during the run state, they will set the appropriate flag but not force the device through the init state. idle state and resume event handling if switched to the idle state by setting sfr bit cfg0.5 [idle] , the system clock to the microcontroller is gated off. this reduces the chip current consum ption and simultaneously improves adc resolution due to the lower noise level during the time that microcontroller is not clocked.
pma51xx functional description data sheet 37 revision 2.1, 2010-06-02 note: the idle state will only be entered if one of the un its providing a resume even t is enabled and active. otherwise, the system will continue ex ecuting code in the run state wit hout entering the idle state. only few peripheral compone nts are still active in the idle state. the watchdog timer is active and will be initialized automatically before entering the idle state; thus the idle state has a maximum duration of approx. 1 second before a watchdog timer wake-up occurs. the system clock to the micr ocontroller is re-enabled wh en a resume event occurs. the program code continues working where it was susp ended. sfr bit cfg0.5 [idle] is automatically cleared after a resume event. the resume event source is available in sfr ref. the idle state will be left in case an interrupt event occurs. after completi on of the interrupt service, the idle state will be re-entered in case no resume event is pending. 2.2.1.1 register description external wake-up flag register table 7 registers overview register short name register long name offset address wakeup value page number wuf wake-up flag register c0 h xxxxxx0x b 40 wum wake-up mask register c1 h uuuuuuuu b 41 ref resume event flag register d1 h 00 h 39 extwuf external wake-up flag register f1 h xxxxxxxx b 37 extwum external wake-up mask register f2 h uuuuuuuu b 38 extwuf offset wakeup value reset value external wake-up flag register f1 h xxxxxxxx b 00 h field bits type description extwu7 7 rc external wake-up event on pp9 extwu6 6 rc external wake-up event on pp8 extwu5 5 rc external wake-up event on pp7 extwu4 4 rc external wake-up event on pp6 extwu3 3 rc external wake-up event on pp4 7 0 7 7 rc extwu7 6 6 rc extwu6 5 5 rc extwu5 4 4 rc extwu4 3 3 rc extwu3 2 2 rc extwu2 1 1 rc extwu1 0 0 rc extwu0
pma51xx functional description data sheet 38 revision 2.1, 2010-06-02 external wake-up mask register extwu2 2 rc external wake-up event on pp3 extwu1 1 rc external wake-up event on pp2 extwu0 0 rc external wake-up event on pp1 extwum offset wakeup value reset value external wake-up mask register f2 h uuuuuuuu b ff h field bits type description mextwu7 7 rw mask external wake-up 7 (on pp9) 0 b external wake-up 7 allowed 1 b external wake-up 7 disabled mextwu6 6 rw mask external wake-up 6 (on pp8) 0 b external wake-up 6 allowed 1 b external wake-up 6 disabled mextwu5 5 rw mask external wake-up 5 (on pp7) 0 b external wake-up 5 allowed 1 b external wake-up 5 disabled mextwu4 4 rw mask external wake-up 4 (on pp6) 0 b external wake-up 4 allowed 1 b external wake-up 4 disabled mextwu3 3 rw mask external wake-up 3 (on pp4) 0 b external wake-up 3 allowed 1 b external wake-up 3 disabled mextwu2 2 rw mask external wake-up 2 (on pp3) 0 b external wake-up 2 allowed 1 b external wake-up 2 disabled mextwu1 1 rw mask external wake-up 1 (on pp2) 0 b external wake-up 1 allowed 1 b external wake-up 1 disabled mextwu0 0 rw mask external wake-up 0 (on pp1) 0 b external wake-up 0 allowed 1 b external wake-up 0 disabled field bits type description 7 0 7 7 rw mextwu7 6 6 rw mextwu6 5 5 rw mextwu5 4 4 rw mextwu4 3 3 rw mextwu3 2 2 rw mextwu2 1 1 rw mextwu1 0 0 rw mextwu0
pma51xx functional description data sheet 39 revision 2.1, 2010-06-02 resume event flag register ref offset wakeup value reset value resume event flag register d1 h 00 h 00 h field bits type description rextg 7 rc clock changed to xtal clock res 6 r for future use readc 5 rc a/d conversion complete relfo 4 rc lf receive buffer full rerff 3 rc rf transmission finished rerfu 2 rc rf transmit buffer empty rerc 1 rc rc calibration complete ret2 0 rc timer 2 underflow 7 0 7 7 rc rextg 6 6 r res 5 5 rc readc 4 4 rc relfo 3 3 rc rerff 2 2 rc rerfu 1 1 rc rerc 0 0 rc ret2
pma51xx functional description data sheet 40 revision 2.1, 2010-06-02 wake-up flag register wuf offset wakeup value reset value wake-up flag register c0 h xxxxxx0x b 00 h field bits type description wdog 7 rc watchdog timer event res 6 reserved lfcd 5 rc lf rx carrier-detect wake-up lfsy 4 rc lf rx sync-match wake-up lfpm1 3 rc lf rx pattern 1-match wake-up lfpm0 2 rc lf rx pattern 0-match wake-up res 1 reserved itim 0 rc interval timer wake-up 7 0 7 7 rc wdog 6 6 res 5 5 rc lfcd 4 4 rc lfsy 3 3 rc lfpm1 2 2 rc lfpm0 1 1 res 0 0 rc itim
pma51xx functional description data sheet 41 revision 2.1, 2010-06-02 wake-up mask register wum offset wakeup value reset value wake-up mask register c1 h uuuuuuuu b ff h field bits type description mwdog 7 rw mask watchdog timer this bit does only have effect in test -, debug - and programming mode. 0 b watchdog timer event allowed. always allowed in normal mode! 1 b watchdog timer event disabled res 6 reserved mlfcd 5 rw mask lf rx carrier detected 0 b lf rx carrier wake-up allowed 1 b lf rx carrier wake-up disabled mlfsy 4 rw mask lf rx sync match 0 b lf rx sync match wake-up allowed 1 b lf rx sync match wake-up disabled mlfpm1 3 rw mask lf rx pattern 1 match 0 b lf rx pattern 1 match wake-up allowed 1 b lf rx pattern 1 match wake-up disabled mlfpm0 2 rw mask lf rx pattern 0 match 0 b lf rx pattern 0 match wake-up allowed 1 b lf rx pattern 0 match wake-up disabled res 1 r for future use mitim 0 rw mask interval timer wake-up this bit does only have effect in test -, debug - and programming mode. 0 b interval timer wake -up allowed. always allowed in normal mode! 1 b interval timer wake-up disabled 7 0 7 7 rw mwdog 6 6 res 5 5 rw mlfcd 4 4 rw mlfsy 3 3 rw mlfpm1 2 2 rw mlfpm0 1 1 r res 0 0 rw mitim
pma51xx functional description data sheet 42 revision 2.1, 2010-06-02 2.2.2 interval timer figure 7 interval timer block diagram the interval timer is responsible for waking up the pma51xx from the power down state after a predefined time interval. it is clocked by the 2 khz rc lp oscillator and incorporates two dividers: ? precounter: can be calibrated to the syst em clock and represents the time base. ? postcounter: configures the interval timer duration. it can be set from 1-256 dec . timing accuracy can be ensured by using a library function that calibra tes the precounter with the accurate system clock (see [1] ). the interval timer duration is determined by the sfr itp r. this value is calculat ed by using the following equation: figure 8 calculation of interval timer period the postcounter (itpr) is an 8-bit register. the maximum interval duration corresponds to 00 h (multiplication with 256 dec ). 01 h up to ff h corresponds to a multiplication with 1 dec up to 255 dec . note: after writing sfr itpr, some clock cycles are neede d to activate the new sett ing. sfr bit cfg1.1 [itinit] is cleared automatically when the new setting is activated. interval timer calibration due to the deviation of th e 2 khz rc lp oscillator fr equency calibration is necessar y and done by counting clock cycles from the crystal oscillator or the 12 mhz rc hf osc illator (depending on the curr ent system clock) during one 2 khz rc lp oscillator period. the counted clock cycles are used to calculate the appropriate configuration values.the calibration is performed automatically by a library function (see [1] ). interval timer 2khz rc lp oscillator (uncalibrated) precounter itfsl [7:0] itfsh [11:8] postcounter itpr [7:0] interval wakeup r postcounte s f precounter ] s [ period timer interval oscillator lp rc khz ? ? ? ? ? ? ? = 1 2
pma51xx functional description data sheet 43 revision 2.1, 2010-06-02 2.2.3 register description interval timer precounter register high byte table 8 registers overview register short name register long name offset address wakeup value page number itpl interval timer precounter register low byte ba h uuuuuuuu b 44 itph interval timer precounter register high byte bb h 0000uuuu b 43 itpr interval timer period register bc h uuuuuuuu b 44 itph offset wakeup value reset value interval timer precounter register high byte bb h 0000uuuu b 03 h field bits type description res 7:4 reserved itp11_8 3:0 rw interval timer precounter register bit 11 down to bit 8 7 0 74 res 30 rw itp11_8
pma51xx functional description data sheet 44 revision 2.1, 2010-06-02 interval timer precounter register low byte interval timer period register note: these sfrs can be modified manually as well for usi ng other (uncalibrated) precounter values. if the interval timer function is not needed for the application, it is recommended to se t the registers itpr, itpl, itph to their maximal value of ff h to save power. in this case, the wa ke-up interval will be extended to maximal interval. itpl offset wakeup value reset value interval timer precounter register low byte ba h uuuuuuuu b e8 h field bits type description itp7_0 7:0 rw interval timer precounter register bit 7 down to bit 0 itpr offset wakeup value reset value interval timer pe riod register bc h uuuuuuuu b 01 h field bits type description itpr 7:0 rw interval timer period register 7 0 7 0 rw itp7_0 7 0 7 0 rw itpr
pma51xx functional description data sheet 45 revision 2.1, 2010-06-02 2.3 system configuration registers the system configuration registers are used for: ? initiating state transitions ? system software reset ? enabling or disabling peripherals ? monitoring the operation mode, the system state, and peripherals 2.3.1 register description table 9 registers overview register short name register long name offset address wakeup value page number cfg2 configuration register 2 d8 h 000u1000 b 48 dsr diagnosis and status register d9 h 0xuu00xu b 49 cfg1 configuration register 1 e8 h 000u000u b 47 cfg0 configuration register 0 f8 h 0000u000 b 46
pma51xx functional description data sheet 46 revision 2.1, 2010-06-02 configuration register 0 cfg0 offset wakeup value reset value configuration register 0 f8 h 0000u000 b 00 h field bits type description pdwn 7 rw power down state enable power down state is entered, if this bit is set to 1 b . this bit is automatically reset to 0 b by the system controller after wake-up from power down state. 0 b run state 1 b power down state res 6 reserved must be set to 0 b . idle 5 rw idle state enable idle state is entered, if this bit is set to 1 b . this bit is automatically reset to 0 b by the system controller after a resume event occurred. 0 b run state 1 b idle state res 4:1 reserved clksel0 0 rw clock source select 0 b 12 mhz rc hf oscillator (internal) 1 b crystal oscillator is selected (external) 7 0 7 7 rw pdwn 6 6 res 5 5 rw idle 41 res 0 0 rw clksel0
pma51xx functional description data sheet 47 revision 2.1, 2010-06-02 configuration register 1 cfg1 offset wakeup value reset value configuration register 1 e8 h 000u000u b 01 h field bits type description pmwen 7 rw program memory write enable 0 b write access to flash program memory not allowed 1 b write access to flash program memory allowed note: write operation to program memory is not feasible on standard 8051 microcontroller, thus write access has to be allowed explicitly i2cen 6 rw i2c enable 0 b i 2 c-interface disabled. port pins pp0 and pp1 are used as gpios 1 b i 2 c-interface enabled. port pins pp0 and pp1 are used for i 2 c communication res 5 reserved rftxpen 4 rw rf tx port out enable 0 b pp2 is used as gpio 1 b pp2 is used for serial output of manchester/biphase coded rf tx data adcen 3 rw adc enable 0 b adc disabled 1 b adc enabled spien 2 rw spi enable 0 b spi-interface disabled. port pins pp3 to pp6 are used as gpios 1 b spi-interface enabled. port pins pp3 to pp6 are used for spi communication itinit 1 r interval timer initialization active 0 b no reload 1 b (re)loads the interval timer with content of itpr/itph/itpl. this bit is automatically cleared after initializat ion completes iten 0 r interval timer enable 1) 0 b interval timer is deactivated (not possible in normal mode) 1 b enables interval timer countdown 1) interval timer is always enabled in normal mode 7 0 7 7 rw pmwen 6 6 rw i2cen 5 5 res 4 4 rw rftxpen 3 3 rw adcen 2 2 rw spien 1 1 r itinit 0 0 r iten
pma51xx functional description data sheet 48 revision 2.1, 2010-06-02 configuration register 2 cfg2 offset wakeup value reset value configuration register 2 d8 h 000u1000 b 18 h field bits type description res 7:5 reserved pdlmb 4 rw power down iram lower memory block 0 b contents of lower 128 byte of data memory (00 h -7f h ) are kept active also in power down state 1 b contents of lower 128 byte of data memory (00 h -7f h ) are lost in power down state pdadc 3 rw power down adc 0 b adc analog circuit is supplied 1 b adc power down (adc analog circuit not supplied) res 2 reserved wdres 1 cw reset watchdog timer 0 b default 1 b watchdog timer is reset and restarts counting from zero note: wdres is cleared automatically reset 0 cw reset system 0 b default 1 b a software-assigned system reset is done. note: bit reset is cl eared automatically. 7 0 75 res 4 4 rw pdlmb 3 3 rw pdadc 2 2 res 1 1 cw wdres 0 0 cw reset
pma51xx functional description data sheet 49 revision 2.1, 2010-06-02 diagnosis and status register dsr offset wakeup value reset value diagnosis and status register d9 h 0xuu00xu b 0xxx0000 b field bits type description sclk 7 r currently selected system clock 0 b 12 mhz rc hf oscillator clock selected 1 b crystal oscillator clock selected res 6 reserved opmode 5:4 r operation mode operation mode applied at chip startup. 00 b test mode 01 b programming mode 10 b debug mode 11 b normal mode res 3:2 r reserved wup 1 r wake-up pending this bit can be used for decision reset / wake-up. 0 b no wake-up pending 1 b wake-up is pending (read detaile d information from wuf/extwuf) flashlck 0 w flash lock is set to 1 b by sw if lockbyte 3 is set (d1 h is detected at flash address 57ff h ). if lockbyte 3 is set without se tting lockbyte 2, this byte has no effect and will result a unlocked flash. 0 b full flash access (f lash related sfrs) 1 b restricted write access 7 0 7 7 r sclk 6 6 res 54 r opmode 32 r res 1 1 r wup 0 0 w flashlc k
pma51xx functional description data sheet 50 revision 2.1, 2010-06-02 2.4 fault protection the pma5110 features multiple fault protections that prevent the application from incurring unexpected behavior and deadlocks. this chapter gives a brief overview of the available fault protections. 2.4.1 watchdog timer for operation security, a watchdog timer is available to avoid applicat ion deadlocks. the watchdog timer must be reset periodically by the microcontroller, otherwise th e timer generates a reset and forces a restart of pma5110 program execution. the sfrs which are not supplied in power down state are initialized after a reset generated by the watchdog timer. the watchdog timer is automatically reset by a power on reset, brown out reset, xreset, software reset (cfg2.0[reset]) or when the idle state is entered. the watchdog timer duration is fixed to a nominal period of 1 s. the accuracy depends on the accuracy of the 2 khz rc lp oscillator that is used to clock the watchdog timer. setting sfr bit cfg2.1 [wdres] resets the watchdog timer (see configuration register 0 ). if a watchdog timer overflow occurred sfr bit wuf.7 [wdog] is set to 1 b . 2.4.2 vmin detector this circuit will detect if the supply voltage is below the minimum value required to guar antee correct chip operation. the library functions that perform measurements will return the vmin status in a status byte with the measurement result. the vmin detector can be used to either monitor the internal regulated supply voltage or the external supply voltage v bat . the selection of the supply voltage to monitor is done with bit lbd.3 [lbd2v1]. if enabled by lbd.1[lbden] and lbd.0[lbdmen], the po wer supply voltage is sensed and bit lbd.2 [lbdf] is set to 1 b , if the supply voltage drops below threshold during measurement time. 2.4.2.1 register description low battery detector control lbd offset wakeup value reset value low battery detector control ef h 0b h 0b h field bits type description res 7:4 reserved 7 0 74 res 3 3 rw lbd2v1 2 2 rc lbdf 1 1 rw lbden 0 0 rw lbdmen
pma51xx functional description data sheet 51 revision 2.1, 2010-06-02 2.4.3 brownout detector the brownout detector re sets the pma when the supply voltage drops below vbrd in run state and below vpdbr in power down state (see table 44 ?power on reset? on page 193 ). 2.4.4 flash memory checksum a crc checksum is stored in the flash memory. a fter lockbyte 2 is written, the crc checksum can be recalculated and checked by the application prog ram for verification of program code if needed. if a single bit error in the flash memory occurs, it is corrected by the flash internal error correction coder, as an indication the fcsp.7 [eccerr] bit is set. (see flash control register - sector protection control on page 59 ) 2.4.5 adc measurement overflow and underflow the library functions that pe rform measurements will return the over/underflow status in a status byte with the measurement result. lbd2v1 3 rw low battery voltage switch 0 b vddd (internal voltage) 1 b v bat (external voltage) lbdf 2 rc low battery detector flag 0 b supply voltage is higher then threshold voltage 1 b supply voltage is lowe r then threshold voltage lbden 1 rw low battery detector enable 0 b low battery detector disabled 1 b low battery detector enabled lbdmen 0 rw low battery detector measurement enable note: lbden must be enabled at least 10us before lbdmen can be set in order to start the measurement 0 b stop measurement 1 b start measurement field bits type description
pma51xx functional description data sheet 52 revision 2.1, 2010-06-02 2.5 clock controller the clock controller for internal clock management is part of the system controller. the pma51xx always starts up using the 12 mhz rc hf osc illator to provide minimum startup time and minimum current consumption. changing the system clock from the 12 mh z rc hf oscillator to the crystal (e.g. for rf transmission) is performed automatically by calling a library function (see [1] ). if the crystal is selected as system clock, the 12 mhz rc hf oscillator is automatically powered down. note: since the external crystal need s some startup time, a 3-bit delay timer is integrated to delay the clock switching. depending on the crystal used, the sfr bits x tcfg.2-0 [xtdly2-0] can be set to delay from typ. 0 s up to 1750 s in 250 s steps (see xtal configuration register ). the following figure shows which clocks are used for whic h pma5110 blocks. details about the individual blocks can be found in the appropriate chapters of this document figure 9 pma5110 clock concept 2.5.1 internal clock divider to save power, it is possible to enab le the internal clock divider to reduce the system clock by a prescaled factor. if sfr divic is set to 00 h (default), the divider is disabled. for a description of the sfr divic see internal clock divider on page 54 . 2.5.2 2 khz rc lp oscillator (low power) the 2 khz rc lp oscillator stays always active. 12 mhz rc hf oscillator crystal oscillator 19,6875 mhz 18,0833 mhz 19,0625 mhz 2 khz rc lp oscillator : 2 sfr divic :64/:16/:4/:1 rf transmitter (pll, vco) interval timer precounter sfr itfsl/h postcounter sfr itpr : 6 crc generator/ checker pseudo random number generator spi i 2 c sfr cfg0 clksel adc microcontroller cpu timer 0/1 gpios lf receiver baudrate generator sfr lfdiv data recovery syncronizer manchester / biphase encoder timer 2/3 baudrate generator rf encoder general purpose timer sfr tmod pp2 / event lf on /off timer precounter sfr lfootp on/off counter sfr lfoot
pma51xx functional description data sheet 53 revision 2.1, 2010-06-02 2.5.3 12 mhz rc hf oscillat or (high frequency) the 12 mhz rc hf oscillator typically runs at 12 mhz. it is used as the default clock source for the pma51xx in run state. 2.5.4 crystal oscillator the nominal crystal operating frequencies are betwee n 18 mhz and 20 mhz depending on the rf band used. figure 10 formulas for crystal selection dependent of rf bands frequency pulling from the nomina l crystal frequency is achieved by the inte rnal capacitor banks. this is used for fine-tuning the ask carrier fr equency and the lowe r and upper modulati on frequencies for f sk modulation. thus, frequency differences due to crystals th at are not exactly matched or differences in component tolerances can be trimmed device internal. figure 11 crystal oscillator a nd fsk-modulator block diagram trimming of the crystal oscillator the crystal oscillator can be trimmed usi ng the internal capacitor array or exte rnally. to use the internal capacitor array sfr bit rftx.7 [xcaps h] has to be set to 0 b . the sfrs sfr xtal0 and sfr xtal1 allow the trimming of the crystal frequency in a broad range using the inte rnal capacitor array. setting sfr bit rftx.7 [xcapsh] to 1 b shorts the internal capacito r array and the crystal oscillator can be trimmed externally. 48 1 ? = ] hz [ f ] hz [ f rf xtal 868 mhz / 915 mhz : 48 2 ? = ] hz [ f ] hz [ f rf xtal 434 mhz : 48 3 ? = ] hz [ f ] hz [ f rf xtal 315 mhz : 18 - 20 mhz crystal oscillator c xtal xcap 8 fsk-modulator xgnd 8bit data sfr xtal 1 8bit data sfr xtal 0 fsk data
pma51xx functional description data sheet 54 revision 2.1, 2010-06-02 2.5.5 register description internal clock divider table 10 registers overview register short name register long name offset address wakeup value page number divic internal clock divider b9 h 000000uu b 54 xtcfg xtal configuration register c2 h 00000uuu b 56 xtal1 xtal frequency register fskhigh/ask c3 h uuuuuuuu b 55 xtal0 xtal frequency register fsklow c4 h uuuuuuuu b 55 divic offset wakeup value reset value internal clock divider b9 h 000000uu b 00 h field bits type description res 7:2 reserved divic 1:0 rw system clock divider factor system clock, selected with cf g0.0[clksel0], is divided by 00 b 1 01 b 4 10 b 16 11 b 64 7 0 72 res 10 rw divic
pma51xx functional description data sheet 55 revision 2.1, 2010-06-02 xtal frequency register fsklow xtal frequency register fskhigh/ask xtal0 offset wakeup value reset value xtal frequency register fsklow c4 h uuuuuuuu b ff h field bits type description fsklow 7:0 w fsk low frequency capacitor select for lo wer fsk modulation frequency if rfenc.3[txdd] = 0 b and rftx.5[askfsk] = 0 b . the capacitor array is binary weighted from fsklow.7 = 20pf (msb) down to fsklow.0 = 156ff (lsb) xtal1 offset wakeup value reset value xtal frequency register fskhigh/ask c3 h uuuuuuuu b ff h field bits type description fskhask 7:0 w fsk high frequency capacitor select for upper fsk modulation frequency if rfenc.3[txdd] = 1 b and rftx.5[askfsk] = 0 b ask center frequency capacitor select for ask center frequency fine tuning if rfenc.3[txdd] = 1 b and rftx.5[askfsk] = 1 b the capacitor array is binary weighted from fskhask.7 = 20pf (msb) down to fskhask.0 = 156ff (lsb) 7 0 7 0 w fsklow 7 0 7 0 w fskhask
pma51xx functional description data sheet 56 revision 2.1, 2010-06-02 xtal configuration register xtcfg offset wakeup value reset value xtal configurat ion register c2 h 00000uuu b 03 h field bits type description res 7:3 reserved xtdly 2:0 rw xtal startup delay time delay time in steps of 250s @ typ. 2 khz rc lp oscillator clock = 2 khz 000 b typ. 0s 001 b typ. 250s 010 b typ. 500s 011 b typ. 750s 100 b typ. 1000s 101 b typ. 1250s 110 b typ. 1500s 111 b typ. 1750s 7 0 73 res 20 rw xtdly
pma51xx functional description data sheet 57 revision 2.1, 2010-06-02 2.6 memory organization figure 12 memory map the following memory blocks are implemented ? 12 kbyte rom ? 6 kbyte flash code memory ? 2x128 byte user flash code/data memory ? 64 byte read-only flash configuration and unique-id ? 2x128 byte data ram, of which 128 bytes may be battery buffered ? 16 byte battery-buffered xdata ram nonvolatile code memory ffff h not implemented 5880 h 5800 h user data sector i 5780 h user data sector ii code 4000 h not implemented 3003 h code memory mapped sfrs 3000 h revision number, checksum mode handlers library functions vectors 0000 h data memory ff h sfr 80 h 7f h 00 h optional battery buffered data ram indirect addressing direct addressing data rom 12 kb flash 6kb ram 256 byte 6016 b 128 b 64b flash configuration 58 b8 h lockbyte 3 007 f h crc sum + lockbyte 2 vectors 4033 h xdata memory 0f h 00 h battery buffered data ram accessible with movx ram 16 byte 128 b upper 128 bytes lower 128 bytes 58 be h unique-id flash configuration 58 c0 h
pma51xx functional description data sheet 58 revision 2.1, 2010-06-02 2.6.1 rom a 12 kbyte rom is located in the address range 0000 h to 2fff h . function library and reset/wake-up handlers the rom contains the reset handler, the wake -up handler, and the function library (see [1] ). a hardware mechanism is implemented to prevent direct jumping into the rom area. access to the library functions is granted via a vector ta ble at the bottom of the rom address space. rom protection a hardware mechanism protects the rom code against readout, so a read operation from the rom in the protected address area returns zero. 2.6.2 flash 2.6.2.1 flash organization the flash is divided into four sectors. each sector ca n be erased and written indi vidually (byte wise erasing and writing is not possible). ? 4000 h -- 577f h (6016 byte) code sector (sector 0): this sector contains the code sector for the application program. ? 5780 h -- 587f h (2x128 byte) user data sector i + user data sector ii (sector 1 + sector 2): these two sectors contain the user data sector, which can stor e individual device configuration data. the crystal frequency that is needed for the library functions could also be saved here. ? 5880 h -- 58bf h (64 byte) configuration sector (sector 3): this sector contains the flash configuration sector for flash driver parameters and is write protected. 2.6.2.2 flash protection write and erase operations on the flash code sector are only allowed in programming mode. to protect the flash against unauthorized access, three lockbytes can be set: ? lockbyte 1: this is written at the end of production test . the flash configuration sector is irreversibly switched to read-only. ? lockbyte 2: address 577f h (top address of the code sector). this byte (as well as a rom crc) is optionally written by the programmer together with the code download. when the reset handler detects this byte, it sets the fcsp.1[codelck]. wh en this bit is set, the debug mode and programming mode are no longer accessible. their pin settings lead to normal mode wherein the crc can be checked. this lockbyte has to be set whil e programming the code sector to protect application code against undesired read-out. ? lockbyte 3: address 57ff h (top of user data sector i). lockbyte 3 can be set by the programmer during program download or by the application. after lockbyte 3 has been set, a reset is necessary to get the user data se ctors locked. write accesses to the flash registers are blocked after lockbyte 3 has been set. if lockbyte 3 is set without setting lockbyte 2, this byte has no effect and will result in an unlocked flash. how to set lockbyte 3 is described in chapter 2.18.6 .
pma51xx functional description data sheet 59 revision 2.1, 2010-06-02 2.6.2.3 register description flash control register - sector protection control fcsp offset wakeup value reset value flash control register - sector protection control e9 h 000000uu b 00 h field bits type description eccerr 7 rc ecc error detected bit 0 b no error detected 1 b error detected res 6:2 reserved codelck 1 rw code sector lock bit is set to 1 b by sw if lockbyte 2 is set (d1 h is detected at flash address 577f h ). 0 b programmable & erasable 1 b read only conflck 0 rw config sector lock bit is set to 1 b by sw if flash configur ation sector has been locked (switched to read only). 0 b programmable & erasable 1 b read only 7 0 7 7 rc eccerr 62 res 1 1 rw codelck 0 0 rw conflck
pma51xx functional description data sheet 60 revision 2.1, 2010-06-02 2.6.3 ram the ram is available as data storage for the applicatio n program. library functions may use some ram locations for passing parameters and internal calculations. the ram ar ea that is used for the library functions is specified in [1] . the ram is always powered in run state and idle state. the upper 128 bytes of ram are always switched off in power down state and lose their contents in these states. sfr bit cfg2.4[pdlmb] determines if the lower 128 byte of ram are powered during power down state. if not powered in these states, this ram loses the cont ent, otherwise it can be used as battery-buffered storage after a power down period. note: the ram is not reset during a system reset. after a brown out reset, this feature can be used to try to recover data from ram. after power on reset, the ram is not initialized, and thus contains random data. the application has to initialize the ram if needed. 2.6.4 code memory mapped sfrs the code memory mapped sfrs can be used to implemen t an opcode which can be modified in runtime, for example to access sfrs or to implement variable jump addresses. the registers mmr0, mmr1, and mmr2 - additionally mapped to address 3000 h - 3002 h may contain up to 3-byte opcode. code address 3003 h contains a hard coded return statement (ret). 2.6.4.1 register description table 11 registers overview register short name register long name offset address wakeup value reset value mmr0 memory mapped register 0 84 h 00 h 00 h mmr1 memory mapped register 1 85 h 00 h 00 h mmr2 memory mapped register 2 86 h 00 h 00 h
pma51xx functional description data sheet 61 revision 2.1, 2010-06-02 2.6.5 battery buffered data ram there are 16 bytes of battery buffered data ram available th at can be used by the application to store data during a power down state period. this memory consumes relati vely little leakage current compared to the whole lower memory block by storing small amount of data. note: the battery buffered data ram is located in the xdat a area and therefore not reset by a system reset. after a brownout reset, this feature can be used to possibly recover data from ram. after a power-on reset, this memory is not initialized, and thus cont ain random data. the application has to initialize th e battery buffered data ram. 2.6.6 special function registers special function registers (sfrs) are used to control an d monitor the status of the pma51xx and its peripherals. the following table shows the naming convention for the sfr descriptions that are used throughout this document. figure 13 naming convention for register descriptions note: if a single bit or the whole byte value is de clared as unchanged, it keeps its state even during powerdownstate. table 12 ?special function registers overview? on page 61 shows the power supply of each sfr and gives a reference to the page within this document where a detailed description can be found. table 12 special function registers overview register short name register long name regi ster address supplied in pdwn description acc accumulator e0 h no page 65 adcc0 adc configuration register 0 db h no page 116 adcc1 adc configuration register 1 dc h no page 118 adcdl adc result register (low byte) d4 h no page 119 adcdh adc result register (high byte) d5 h no page 119 adcm adc mode register d2 h no page 120 adcoff adc input offset c-network configuration da h no page 121 adcs adc status register d3 h no page 122 b register b f0 h no page 65 cfg0 configuration register 0 f8 h yes page 46 r/c/w - 0/0 value after power on reset value after wakeup from pow er dow n state x ?status dependent on environmental setting u ... unchanged 1 ... high 0 ... low access: r ... readable c ... automatically cleared after read w ... writeable
pma51xx functional description data sheet 62 revision 2.1, 2010-06-02 cfg1 configuration register 1 e8 h yes page 47 cfg2 configuration register 2 d8 h yes page 48 crcc crc control register a9 h no page 125 crcd crc data register aa h no page 126 crc0 crc shift register (low byte) ac h no page 126 crc1 crc shift register (high byte) ad h no page 127 divic internal clock divider b9 h yes page 54 dpl data pointer (low byte) 82 h no page 65 dph data pointer (high byte) 83 h no page 65 dsr diagnosis and status register d9 h no page 49 extwuf external wake-up flag register f1 h yes page 37 extwum external wake-up mask register f2 h yes page 38 fcsp flash control register - sector protection control e9 h no page 59 i2cb i 2 c baud rate register b1 h no page 160 i2cc i 2 c control register a2 h no page 161 i2cd i 2 c data register 9a h no page 162 i2cm i 2 c mode register a3 h no page 162 i2cs i 2 c status register 9b h no page 163 ie interrupt enable register a8 h no page 69 ip interrupt priority register b8 h no page 70 irqrf interrupt request flag register (for extended interrupts) 8f h no page 71 itpl interval timer precounter register (low byte) ba h yes page 44 itph interval timer precounter register (high byte) bb h yes page 43 itpr interval timer period register bc h yes page 44 lbd low battery de tector control ef h no page 50 lfcdflt lf carrier de tect filtering b2 h yes page 94 lfcdm lf carrier detector mode b5 h yes page 95 lfdiv0 lf division factor (low byte) b3 h yes page 96 lfdiv1 lf division factor (high byte) b4 h yes page 96 lfoot lf on/off timer configuration register c6 h yes page 97 lfootp lf on/off timer precounter register c5 h yes page 98 lfpcfg lf pattern detection configuration register c7 h yes page 100 table 12 special function registers overview register short name register long name regi ster address supplied in pdwn description
pma51xx functional description data sheet 63 revision 2.1, 2010-06-02 lfp0l lf pattern 0 detector sequence data lsb be h yes page 99 lfp0h lf pattern 0 detector sequence data msb bf h yes page 98 lfp1l lf pattern 1 detector sequence data lsb ce h yes page 100 lfp1h lf pattern 1 detector sequence data msb cf h yes page 99 lfrx0 lf receiver configuration register 0 b7 h yes page 101 lfrx1 lf receiver configuration register 1 b6 h yes page 102 lfrxc lf receiver control register f9 h yes page 103 lfrxd lf receiver data register a5 h yes page 104 lfrxs lf receiver status register a4 h yes page 105 lfsyncfg lf sync matching configuration register af h yes page 107 lfsyn0 lf sync pattern (low byte) a6 h yes page 106 lfsyn1 lf sync pattern (high byte) a7 h yes page 106 mmr0 memory mapped register 0 84 h no page 60 mmr1 memory mapped register 1 85 h no page 60 mmr2 memory mapped register 2 86 h no page 60 p1dir io-port 1 direction register 91 h yes page 150 p1in io-port 1 data in register 92 h yes page 152 p1out io-port 1 data out register 90 h yes page 153 p1sens io-port 1 sens itivity register 93 h yes page 154 p3dir io-port 3 direction register eb h yes page 151 p3in io-port 3 data in register ec h yes page 152 p3out io-port 3 data out register b0 h yes page 153 p3sens io-port 3 sensitivity register ed h yes page 155 psw program status word d0 h no page 66 ref resume event flag register d1 h no page 39 rfc rf transmitter control register ee h no page 77 rfd rf encoder tx data register 8e h no page 77 rfenc rf encoder tx control register e7 h no page 78 rffspll rf frequency synthesizer pll configuration d7 h no page 80 rfs rf encoder tx status register e6 h no page 81 rffsld rf frequency synthesizer lock detector configuration df h yes page 79 table 12 special function registers overview register short name register long name regi ster address supplied in pdwn description
pma51xx functional description data sheet 64 revision 2.1, 2010-06-02 rftx rf transmitter configuration register ae h yes page 82 rfvco rf frequency synthesizer vco configuration de h yes page 83 rngd rng data register ab h yes page 128 sp stack pointer 81 h no page 65 spib spi baud rate register (11 bit cascaded register) f3 h no page 171 spic spi control register f4 h no page 172 spid spi data register f5 h no page 173 spim spi mode register f6 h no page 173 spis spi status register f7 h no page 175 tcon timer control register (timer 0/1) 88 h no page 132 tcon2 timer control register 2 (timer 2/3) c8 h no page 143 th0 timer 0 register (high byte) 8c h no page 133 th1 timer 1 register (high byte) 8d h no page 133 th2 timer 2 register (high byte) cd h no page 144 th3 timer 3 register (high byte) cb h no page 144 tl0 timer 0 register (low byte) 8a h no page 134 tl1 timer 1 register (low byte) 8b h no page 134 tl2 timer 2 register (low byte) cc h no page 145 tl3 timer 3 register (low byte) ca h no page 145 tmod timer mode register (timer 0/1) 89 h no page 135 tmod2 timer mode register 2 (timer 2/3) c9 h no page 146 wuf wake-up flag register c0 h yes page 40 wum wake-up mask register c1 h yes page 41 xtal0 xtal frequency register (fsklow) c4 h yes page 55 xtal1 xtal frequency register (fskhigh/ask) c3 h yes page 55 xtcfg xtal configuration register c2 h yes page 56 table 12 special function registers overview register short name register long name regi ster address supplied in pdwn description
pma51xx functional description data sheet 65 revision 2.1, 2010-06-02 2.7 microcontroller central part of the pma51xx is an 8051 instruction set compatible microcontroller. the cpu offers an 8 bit data path, an interrupt controller, several addressing modes (direc t, register, register indirect, bit direct), and accesses peripheral components using special fu nction registers (sfr). the architecture of the cpu is well known and not part of this description. howeve r some of the features are not needed or adapted to special product requirements. these f eatures are described herein in detail. the cpu incorporates basic core internal registers. accumulator (acc), register b (b) and program status word (psw) are bit addressable registers used to perform arit hmetical and logical operations. stack pointer (sp) and data pointer (dpl/dph) ar e included to allow basic programming structures. 2.7.1 register description table 13 registers overview register short name register long name offset address wakeup value reset value sp stack pointer 81 h 07 h 07 h dpl data pointer (low byte) 82 h 00 h 00 h dph data pointer (high byte) 83 h 00 h 00 h psw program status word d0 h 00 h 00 h acc accumulator e0 h 00 h 00 h b register b f0 h 00 h 00 h
pma51xx functional description data sheet 66 revision 2.1, 2010-06-02 program status word sfr psw holds the result of basic arithmetic operations. psw offset wakeup value reset value program status word d0 h 00 h 00 h field bits type description cy 7 rw carry bit set to 1 b if acc changes signed number range through 00 h /ff h (unsigned range overflow). ac 6 rw auxiliary carry bit carry-out for bcd operations. f0 5 rw general purpose bit 0 may be freely used by software. rs1 4 rw register select bit 1 register bank select bit 1. rs0 3 rw register select bit 0 register bank select bit 2. ov 2 rw overflow bit set to 1 b if acc changes signed number range through 80 h /7f h with arithmetic operations (signed range overflow). f1 1 rw general purpose bit 1 may be freely used by software. p0r parity bit reflects the number of 1s in the acc (set to 1 b if acc contains an odd number of 1s) 7 0 7 7 rw cy 6 6 rw ac 5 5 rw f0 4 4 rw rs1 3 3 rw rs0 2 2 rw ov 1 1 rw f1 0 0 r p
pma51xx functional description data sheet 67 revision 2.1, 2010-06-02 2.8 interrupt sources as in the integrated cpu, the rest of pma5110 supports interrupt events from several sources which are listed in table 14 . when an unmasked interrupt occurs, the program counter (pc) is automatically set to the vector assigned to the interrupt source. from there, the vector is forwarded vi a ljmp instruction into the flash area and the offset of 4000 h is added. when an unmasked interrupt occurs while the device is in idle state, this state is immediately left and the pc continues operation on the appropriate interrupt vector. a fter the processing of the interrupt service routine (isr) (reti instruction), the device automat ically returns to the idle state in case no resume event has occurred in between. if a resume event has been detected during the is r, the reti instruction retu rns the pc to the location after the idle instruction. it is highly re commended that this instruction to be a nop. the priority of the interrupts can be configured using the ip register. setting a bit in ip to one assigns higher priority to the linked interrupt. a high-priority interrupt can then interrupt a service routine from a low-priority interrupt. 2.8.1 external interrupts 0 and 1 the pma51xx has two external interrupt sources, ext_in t0 on pp9 and ext_int1 on pp7. according to the 8051 standard implementation, the control bits and interrupt flags can be found in the tcon register (please refer to timer control register timer 0/1 on page 132 ). when enabled by setting ie.0 [ex0] fo r external interrupt 0 (resp. ie.2 [ex1 ] for external interrupt 1), interrupts can be generated from pp9 (resp. pp7). external interrupts 0 and 1 can be programmed to be level- activated or negative-transition activated by clearing or setting bit tcon.0 [it0], respectively tcon.2 [it1]. if bit itx=0, the corresponding external interrupt is triggered by a detected low-level at the pin. if itx=1, the corresponding external interrupt is negative edge- triggered. in this mode, if successive samples of the pin show a high in one cycle and a low in the next cycle, interrupt request flag iex in tcon is set. flag bit iex=1 then requests the interrupt. table 14 interrupt vector locations interrupt vector vector address forwarded address interrupt source reset vector 00 h 4000 h vector 0 03 h 4003 h external interrupt 0 (pp9) vector 1 0b h 400b h timer 0 interrupt vector 2 13 h 4013 h external interrupt 1 (pp7) vector 3 1b h 401b h timer 1 interrupt vector 4 23 h 4023 h i 2 c interface interrupt vector 5 2b h 402b h spi interface interrupt vector 6 33 h 4033 h extended interrupt: the flash soft ware has to detect the interrupt source peripheral from this vector by reading irqfr and the appropriate source within the peripheral from the various flag registers. ? timer 2 interrupt ? timer 3 interrupt ? lf receiver interrupt ? rf encoder interrupt
pma51xx functional description data sheet 68 revision 2.1, 2010-06-02 if the external interrupt is level-activated, the external source has to hold the request active until the requested interrupt is actually generated. then it has to deactivate the request before the isr is completed, or else another interrupt will be generated. each of the external interrupts has its own interrupt vector. 2.8.2 timer interrupts all four timers on the pma51xx can be used as interrupt sources. while timer 0 and timer 1 are fully co mpatible with the or iginal 8051 cpu (for a de scription please refer to ?timer/counter interrupts? on page 76), timer 2 and timer 3 interrupts are treated as extended interrupts. 2.8.3 i 2 c interface interrupts the data transfer on the i 2 c interface can be controlled via interrupts. this module has a separate interrupt vector (vector address 4023 h ) where the pc is automatically set whenever one of the i 2 c interrupt flags is active and the interrupt source is unmasked. 2.8.4 spi interface interrupts the data transfer on the spi interface can be controlled via interrupts. this module has a separate interrupt vector (vector address 402b h ) where the pc is automatically set whenever on e of the spi interrupt flags is active and the interrupt source is unmasked. 2.8.5 lf receiver interrupts while one feature of the lf receiver is to wake up the device , it is also possible to rece ive data via the lf interface in run mode by selecting the 12 mhz rc oscillator as the system clock. the wake-up flags are used as interrupt event flags, and wake-up mask bi ts are used as interrupt mask bits as well. interrupt flags ? wuf.5 [lfcd]: carrier detected ? wuf.4 [lfsy]: sync match detected ? wuf.3 [lfpm1]: pattern match pattern 1 ? wuf.2 [lfpm0]: pattern match pattern 0 interrupt mask bits ? wum.5 [lfcd]: if set to 1 the carrier det ector interrupt is masked (disabled) ? wum.4 [lfsy]: if set to 1 the sync match interrupt is masked (disabled) ? wum.3 [lfpm1]: if set to 1 the pattern match interrupt for pattern 1 is masked (disabled) ? wum.2 [lfpm0]: if set to 1 the pattern match interrupt for pattern 0 is masked (disabled) in addition the extended interrupt sources have to be enabled by setting ie.6 [eid] to 1. 2.8.6 rf encoder interrupts the cpu should be kept in the idle state during rf tran smission, this leads to a better emission spectrum. nevertheless, it is poss ible to coordinate the data transfer interrupt driven. therefore, two interrupt sources are available for rf transmission: rf encoder interrupt source flags: ? rfs.0 [rfbf] rf encoder buffer full ? rfs.1 [rfse] rf encoder shift register empty
pma51xx functional description data sheet 69 revision 2.1, 2010-06-02 2.8.7 register description interrupt enable register table 15 registers overview register short name register long name offset address wakeup value page number irqfr interrupt request flag register for extended interrupts 8f h 00 h 71 ie interrupt enable register a8 h 00 h 69 ip interrupt priority register b8 h 00 h 70 ie offset wakeup value reset value interrupt enable register a8 h 00 h 00 h field bits type description ea 7 rw global interrupt enable 0 b all interrupts are disabled 1 b interrupts enabled acco rding to their enable bits eid 6 rw enable extended interrupts timer 2/3, lf receiver, rf encoder 0 b interrupts disabled 1 b interrupts enabled acco rding to their enable bits espi 5 rw enable interrupts from spi 0 b interrupts disabled 1 b interrupts enabled ei2c 4 rw enable interrupts from i2c 0 b interrupts disabled 1 b interrupts enabled acco rding to their enable bits et1 3 rw enable interrupts from timer 1 0 b interrupts disabled 1 b interrupts enabled acco rding to their enable bits ex1 2 rw enable external interrupts from pp7 0 b interrupts disabled 1 b interrupts enabled 7 0 7 7 rw ea 6 6 rw eid 5 5 rw espi 4 4 rw ei2c 3 3 rw et1 2 2 rw ex1 1 1 rw et0 0 0 rw ex0
pma51xx functional description data sheet 70 revision 2.1, 2010-06-02 interrupt priority register et0 1 rw enable interrupts from timer 0 0 b interrupts disabled 1 b interrupts enabled acco rding to their enable bits ex0 0 rw enable external interrupts from pp9 0 b interrupts disabled 1 b interrupts enabled ip offset wakeup value reset value interrupt priority register b8 h 00 h 00 h field bits type description res 7 reserved pid 6 rw priority level for extended interrupts timer 2/3, lf receiver, rf encoder 0 b low priority 1 b high priority pspi 5 rw priority level for spi interrupts 0 b low priority 1 b high priority pi2c 4 rw priority level for i2c interrupts 0 b low priority 1 b high priority pt1 3 rw priority level for timer 1 interrupts 0 b low priority 1 b high priority px1 2 rw priority level for external interrupts from pp7 0 b low priority 1 b high priority pt0 1 rw priority level for timer 0 interrupts 0 b low priority 1 b high priority field bits type description 7 0 7 7 res 6 6 rw pid 5 5 rw pspi 4 4 rw pi2c 3 3 rw pt1 2 2 rw px1 1 1 rw pt0 0 0 rw px0
pma51xx functional description data sheet 71 revision 2.1, 2010-06-02 interrupt request flag register for extended interrupts px0 0 rw priority level for external interrupts from pp9 0 b low priority 1 b high priority irqfr offset wakeup value reset value interrupt request flag register for extended interrupts 8f h 00 h 00 h field bits type description res 7:4 reserved irqrfe 3 rc interrupt request flag rf encoder 0 b no interrupt occurred or flag cleared by readout 1 b rf encoder interrupt occurred irqflf 2 rc interrupt request flag lf receiver 0 b no interrupt occurred or flag cleared by readout 1 b lf receiver in terrupt occurred irqft3 1 rc interrupt request flag timer 3 0 b no interrupt occurred or flag cleared by readout 1 b timer 3 interrupt occurred irqft2 0 rc interrupt request flag timer 2 0 b no interrupt occurred or flag cleared by readout 1 b timer 2 interrupt occurred field bits type description 7 0 74 res 3 3 rc irqrfe 2 2 rc irqflf 1 1 rc irqft3 0 0 rc irqft2
pma51xx functional description data sheet 72 revision 2.1, 2010-06-02 2.9 rf transmitter the rf transmitter consists of a pll frequency synthesizer that is contained fully on chip, a lock detector, and a power amplifier. figure 14 rf transmitter block diagram the rf transmitter can be configured for the 31 5/434/868/915 mhz ism-band frequencies by setting sfr bits rftx.3-2 [ismb1-0] and choosing the proper cr ystal. manchester/biphase/nrz coded data with a bit rate up to 32 kbit/s (64 kchips/s) for the temperatur e range -40c to +85c and 20 kbit/s (40 kchips/s) for temperatures above +85 c can be transmitted using ask or fsk modulation. the pll synthesizer and the power amplifier can be enab led separately by using the sfr rfc control register. the power amplifier should be switched on with a delay of at least 100 s after enabling the frequency synthesizer. this delay is needed for pll locking. 2.9.1 phase-locked loop (pll) the pll consists of an on-chi p vco, an asynchronous divider chain with selectable overall division ratio, a phase detector with charge pump, and an internal loop filter. (see rf frequency synthesizer pll configuration on page 80 ) pll vco pa loop - filter cp phase detector crystal 315 mhz 434 mhz 868 mhz 915 mhz 1890 mhz 1736 mhz 1736 mhz 1830 mhz divider 2 pll lock detector sfr rftx.3 -2 ismb 1-0 0 - 315 mhz 1 - 434 mhz 2 - 868 mhz 3 - 915 mhz sfr rftx.1-0 paop1-0 sfr rfc.0 enpa fsk -mod fsk- transmit data ask- transmit data manchester/ biphase encoder sfr rfs sfr rfenc sfr rfd sfr rftx.6 itxd sfr rftx.5 askfsk l o g i c transmit data sfr rfc enfsyn cdcc dcc 00 - 44 % 01 - 39 % 10 - 34 % 11 - 27 % divider chain
pma51xx functional description data sheet 73 revision 2.1, 2010-06-02 the pll can be enabled manually by setting sfr bit rfc. 1 [enfsyn]. the pll lock frequency is determined by the crystal used (see figure 10 ?formulas for crystal selection dependent of rf bands? on page 53 ) and the appropriate configuration in the sfr bits rftx.3-2 [ismb1-0]. 2.9.2 voltage-controlled oscillator (vco) 16 frequency tuning curves are available to tune the vco. the library function vcotuning() can be used to select the appropriate tuning curve for the vco depending on environmental conditions (temperature, v bat ) and to enable the pll (please refer to [1] ). selection of the tuning curve can also be done using rf vco.3-0 [vcof3-0]. this is done automatically by the reset handler after power up or a system reset by usin g the pll lock detector and the pll lock-detection routine. additionally, the pll lock detector for vco tuning curve se lection may be used by the user program code before rf data transmission. note: recalibration of the tuning curve is typically nece ssary when the supply voltage changes by more than 800 mv or the temperature changes by more than 70 degrees. 2.9.3 power amplifier (pa) the highly efficient power amp lifier is enabled automatically if a byte is transmitted (rfs.1 [rfse] is set to 0 b ). alternatively, the power am plifier is enabled immediately by using rfc.0 [enpa]. rfenc.3 [txdd] is used to define the quiescent state (symbol that is sent when no data is available in rfd). the nominal transmit power levels are +5/8/10 dbm into a 50 ? load at a supply voltage of 3.0 v. the power amplifier operating point must be optimized to the output power +5/8/10 dbm regarding current consumption by properly setting the rftx.1-0 [paop1-0], rffspll.3-2 [dcc1-0] and using an optimal-s ized matching circuit. the power amplifier should be enabled at least 100 s after enabling the rf frequ ency synthesizer because of the pll lock-in time. 2.9.4 ask modulator ask modulation is done by turning on and off the power amplifier, depending on the baseband data to be transmitted (on/off-keying) by us ing rfenc.3 [txdd] or the manchester/biphase encoder (see also manchester/biphase encoder with bit rate generator ). for information about fsk modulation, please see crystal oscillator .
pma51xx functional description data sheet 74 revision 2.1, 2010-06-02 2.9.5 manchester/biphase encode r with bit rate generator a manchester/biphase encoder controlled by the cpu is av ailable as source for the rf transmitter. the encoding bit rate can be set with timer 3 (see chapter 2.14.2.3 ). the application software needs to configure the timer and can subsequently send the raw uncoded data to t he manchester/biphase encoder which takes care about encoding and the rf tr ansmission itself (controlling th e power amplifier). using the hardware encode r allows the cpu to be operated at a reduced clock rate ther eby reducing the peak current consumption during rf transmission. the reduced cpu clock rate also reduces the possibility of clock noise artifacts in the rf signal (see chapter 2.5.1 ). furthermore, the encoder creates a resume event after sending each byte therefore the application can enter idle state while sending each databyte (see chapter 2.1.2.3 ). it is recommended to use both reduced clock rate and idle mode for best perfo rmance during rf transmission. a library function is available for comfortable configuratio n of the manchester/biphase encoder. figure 15 manchester/biphase encoder for a transmission using manchester, biphase or chip coding data is written to sfr rfd. the manchester/biphase encoder automatically enables the power amplifier when a new data byte is written to sfr rfd and disables the power amplifier after tran smitting the last data bit automatically as well. the encoding selection can be changed every time before a data byte is written to the sfr rfd by adjusting sfr bits rfenc.2-0 [rfmode2-0]. the chip coding mode (sfr bits rfenc.2-0 [rfmode2-0] = 101b) can be used to send data with a user-defined encoding scheme, e.g. for sending a preamble. the chip mode sends each bit without encoding, but at twice the data rate. for full flexibility in terms of timing a nd protocol the rf pa can be controlled without using the bi t encoder. if the shift register is empty, the data va lue defined by sfr bit rfenc.3 [txdd] is assigned to the encoder output after the rf pa has been enabled by setting sfr bit rfc.1 [en fsyn] and sfr bit rfc.0 [enpa]. if any byte is written into sfr rfd the bit encoder takes over control of the rf pa until the last bit has been transmitted and the shift register is empty again. the rf encoder ou tput can be connected to pp2 , if enabled via cfg1.4[rftxpen ]. when this alternate port functionality is enabled, the sfr bit rf c.1 [enfsyn] and sfr bit rfc.0 [enpa] mu st be set in order to allow the rf encoder output to properly modulate the rf pa. note: the power amplifier s hould be switched on using sfr bit rfc.0 [enpa] with a delay of at least 100 s after enabling the frequency synthesizer using sfr bit rfc.1 [enfsyn] . this delay is needed for pll locking. mod bit encoder buffer shift reg sfr rfd rfenc.txdd rfs.rfse shift reg empty rf manchester/bi-phase encoder (simplified view ) rfenc.rfmode raw data rftx.askfsk pa control logic rfc.enpa rf pa enable encoder output rfs.rfbf rfenc.rfdlen timer3 bitrate strobe msb
pma51xx functional description data sheet 75 revision 2.1, 2010-06-02 the following figure shows the different timing diagrams for the various encoding schemes: figure 16 diagram of the different rf encoder modes differential manchester data clock manchester inverted manchester biphase-0 biphase-1 10100110 sfr rfd clock chip 10100110 encoder- mode (manchester/biphase) chip mode start of data transmission transmission finished in chip-mode transmission finished in encoder-mode time
pma51xx functional description data sheet 76 revision 2.1, 2010-06-02 timer 3 (see chapter 2.14.2.3 ) provides the bit rate clock and has to be set according to the desired bit rate. the bit rate timer value can be calcul ated with the following formula: figure 17 calculation of rf bit rate timer value timer 3 has to be configured properly using timer registers (see registers tl2 , th2 , tl3 , th3 , tmod2 , tcon2 ). the sfr rfs represents the status of the rf encoder. after writing a data byte to sfr rfd, the sfr bit rfs.0 [rf bf] is set. it is cleared automatically when the data byte in sfr rfd is transfer red to the sh ift register. the application should poll sfr bit rfs. 0 [rfbf] to determine when the data is transferred to the shift register and sfr rfd can take the next data byte for processing. it is necessary to provide the transmitter with a continuous data stream. if no data is available, the transmitter falls back to quiescent state (see sfr bit rfenc.3 [txdd] ), if the power amplifier has been enabled by sfr bit rfc.1 [enfsyn] and sfr bit rfc. 0 [enpa], otherwise the power amplifier is turned off automatically. sfr bit rfs.1 [rfse] is set when the last data bit has been transmitted. if th is bit is set, the power amplifier and the pll can be disabled. if there are any data in the shift register this bit is cleared. 2.9.6 register description table 16 registers overview register short name register long name offset address wakeup value page number rfd rf encoder tx data register 8e h 00 h 77 rftx rf transmitter configuration register ae h uuuuuuuu b 82 rffspll rf frequency synthesizer pll configuration d7 h 82 h 80 rfvco rf frequency synthesizer vco configuration de h uuuuuuuu b 83 rffsld rf frequency synthesizer lock detector configuration df h 000uuuuu b 79 rfs rf encoder tx status register e6 h 02 h 81 rfenc rf encoder tx control register e7 h e0 h 78 rfc rf transmitter control register ee h 00 h 77 [] 1 1 8 ? ? ? ? ? ? ? ? = s bitrate hz f value timer source clock timer
pma51xx functional description data sheet 77 revision 2.1, 2010-06-02 rf transmitter control register rf encoder tx data register by writing a data byte to the sfr rfd, the data transmission is invoked automatically. by default, the transmission takes place byte-aligned. if fewer than 8 bits are to be transmitted, sfr bits rfenc.7-5 [rfdlen2-0] can be set to determine the number of bits that should be transm itted with msb first. in th is case the unused lsbs are disregarded. rfc offset wakeup value reset value rf transmitter control register ee h 00 h 00 h field bits type description res 7:2 reserved enfsyn 1 rw enable rf frequency synthesizer 0 b rf frequency synthesizer disabled 1 b rf frequency synthesizer enabled enpa 0 rw enable rf power amplifier 0 b rf power amplifier disabled 1 b rf power amplifier enabled rfd offset wakeup value reset value rf encoder tx data register 8e h 00 h 00 h field bits type description rfd 7:0 w rf encoder tx data register 7 0 72 res 1 1 rw enfsyn 0 0 rw enpa 7 0 7 0 w rfd
pma51xx functional description data sheet 78 revision 2.1, 2010-06-02 rf encoder tx control register rfenc offset wakeup value reset value rf encoder tx control register e7 h e0 h e0 h field bits type description rfdlen 7:5 rw rf data length number of bits to be transmitted fr om sfr rfd with msb first. if fewer than 8 bits are transmitted, t he unused lsbs are disregarded. 000 b 1 bit 001 b 2 bits 010 b 3 bits 011 b 4 bits 100 b 5 bits 101 b 6 bits 110 b 7 bits 111 b 8 bits rfmask 4 rw rf interrupt mask flag 0 b interrupt enabled 1 b interrupt disabled (masked) txdd 3 rw transmit data if sfr bit rfc.1-0 [enfsyn -enpa] is set. defines quiescent state on rf tx. symbol that is sent when no data is available in rfd. 0 b rf tx transm its symbol for 0 b 1 b rf tx transm its symbol for 1 b rfdmode 2:0 rw rf encoder mode a diagram of the different rf encoder modes can be found in figure 16 . 000 b manchester 001 b inverted manchester 010 b differentia l manchester 011 b biphase-0 100 b biphase-1 101 b chips: data bits are interpreted as chips 110 b reserved 111 b reserved 7 0 75 rw rfdlen 4 4 rw rfmask 3 3 rw txdd 20 rw rfdmode
pma51xx functional description data sheet 79 revision 2.1, 2010-06-02 rf frequency synthesizer lock detector configuration rffsld offset wakeup value reset value rf frequency synthesizer lock detector configuration df h 000uuuuu b 08 h field bits type description res 7:6 reserved nolock 5 rc pll lock indicator 0 b pll has locked or bit cleared by read out 1 b pll has not locked while enlockdet=1 b enlockdet 4 w enable lock detector 0 b lock detector disabled 1 b lock detector enabled ll 3:0 w lock limit selection sets the number of phase synchronizati on violation. ll3-0 count value is reset to zero when the enlockdet bit is reset. 0000 b first violation will trigger nolock 0001 b second violatio n will trigger nolock ... 1110 b 15 th violation will trigger nolock 1111 b 16 th violation will trigger nolock 7 0 76 res 5 5 rc nolock 4 4 w enlockd et 30 w ll
pma51xx functional description data sheet 80 revision 2.1, 2010-06-02 rf frequency synthesizer pll configuration rffspll offset wakeup value reset value rf frequency synthesizer pll configuration d7 h 82 h 82 h field bits type description fpdpol 7 w frequency-phase-detector polarity must be 1 b ddcc 6 w disable rf divider duty cycle control 0 b rf divider duty cycle control enabled 1 b rf divider duty cycle control disabled ablp 5:4 w antibacklash pulse width selection 00 d 1.2ns (default value, do not change) dcc 3:2 w rf divider duty cycle control (high/low ratio) the rf divider duty cycle control can be used to increase the power amplifier output power at low supply voltages. 00 b 44% 01 b 39% 10 b 34% 11 b 27% cpcu 1:0 w charge pump current selection 10 b 20a (default value, do not change) 7 0 7 7 w fpdpol 6 6 w ddcc 54 w ablp 32 w dcc 10 w cpcu
pma51xx functional description data sheet 81 revision 2.1, 2010-06-02 rf encoder tx status register rfs offset wakeup value reset value rf encoder tx status register e6 h 02 h 02 h field bits type description res 7:2 reserved rfse 1 r rf encoder shift register empty this bit is automatically set by hardware if no further bits are available in the shift register. 0 b rf encoder shift register is not empty 1 b rf encoder shift register is empty rfbf 0 r rf encoder buffer full this bit is automatically set by hardware on write access to register rfd or cleared if data in register rfd is transferred to shift register respectively. 0 b rf encoder buffer empty 1 b rf encoder buffer full 7 0 72 res 1 1 r rfse 0 0 r rfbf
pma51xx functional description data sheet 82 revision 2.1, 2010-06-02 rf transmitter configuration register rftx offset wakeup value reset value rf transmitter configuration register ae h uuuuuuuu b 07 h field bits type description xcapsh 7 w enable xcap short more information about this bit can be found in chapter 2.5.4 . 0 b xcap short disabled 1 b xcap short enabled invtxdat 6 w invert tx data 0 b tx data not inverted 1 b tx data inverted askfsk 5 w tx mode 0 b fsk 1 b ask res 4 reserved ismb 3:2 w rf frequency select ismb 00 b 315mhz frequency range 01 b 434mhz frequency range 10 b 868mhz frequency range 11 b 915mhz frequency range paop 1:0 w rf power amplifier ou tput power selection 00 b 5dbm 01 b 8dbm 10 b 8dbm 11 b 10dbm 7 0 7 7 w xcapsh 6 6 w invtxda t 5 5 w askfsk 4 4 res 32 w ismb 10 w paop
pma51xx functional description data sheet 83 revision 2.1, 2010-06-02 rf frequency synthesizer vco configuration rfvco offset wakeup value reset value rf frequency synthesizer vco configuration de h uuuuuuuu b 90 h field bits type description vcocc 7:4 rw vco core current selection 0000 b 0a 0001 b 200a 0010 b 400a 0011 b 600a 0100 b 800a 0101 b 1000a 0110 b 1200a 0111 b 1400a 1000 b 1600a 1001 b 1800a 1010 b 2000a 1011 b 2200a 1100 b 2400a 1101 b 2600a 1110 b 2800a 1111 b 3000a vcof 3:0 rw vco tuning curve selection 0000 b tuning curve 0 0001 b tuning curve 0 ... 1110 b tuning curve 14 1111 b tuning curve 15 7 0 74 rw vcocc 30 rw vcof
pma51xx functional description data sheet 84 revision 2.1, 2010-06-02 2.10 lf receiver figure 18 lf receiver the lf receiver is used for wireless data transmission towards the pma5110 and for waking up the device from powerdownstate. it can generate a wake-up directly by the carrier detector if the carrier amplitude is above a preset threshold, or it can decode the received data and not wake up the mi crocontroller until a predefined sync match pattern or wake- up pattern is detected in the data stream. data recovery using a synchronizer and a decoder is available for manchester and biphase coded data. the synchronizer can also handle manchester/biphase code violations. any other coding scheme can be handled directly by the microcontroller on t he chip level without using the decoder. an lf on/off timer is implemented to generate peri odic on/off switching of the lf receiver in the power down state. this can be done to reduce the current consumption. 2.10.1 lf receiver analog fr ont end configuration the lf receiver analog front end (afe) co nsists of an input attenuator wi th an automatic gain control (agc), an amplifier with selectabl e gain, an ask demodulator, a data filter an d data slicer with adjustable filter bandwidth for different data rate. additionally, a carrie r detector with adjustable threshold is implemented. a lf carrier detector filter can be enabled to avoid wake-up by interferers. lf baseband processor lf data recovery (chip level) lf rx analog front end afe manchester / biphase decoder lf receiver lf receiver on/off timer baudrate generator synchronizer carrier detector lf data lfrxs.cdraw lf xlf lf-antenna wakeup to systemcontroller wuf.lfcd lfoot lfootp lfrxd wakeup to systemcontroller wuf.lfpm1 wakeup to systemcontroller wuf.lfpm0 wakeup to systemcontroller wuf.lfsy lfrxs.lfdata lfrxs.lfraw lfrxc.enootim lfrxc.enlfrx lfsyncfg.lfcda &
pma51xx functional description data sheet 85 revision 2.1, 2010-06-02 figure 19 lf receiver afe block diagram 2.10.1.1 attenuator (agc) and da ta filter / data slicer an input attenuator is provided to limit strong signals an d interferers across the differential input. the attenuator detects the receiver input level and acts as an automa tic gain control block (fast attack, slow decay). the attenuator decay slew rate can be adjusted by c hanging the decay slew rate using sfr bits lfrx1.7- 6 [agctcd1-0]. figure 20 lf receiver afe block diagram sfr lfrx1 is as well used to configure the data slicer and data filter according to the desired bit rate. 2.10.1.2 lf carrier detector a level-detection circuit is implemented to determine if the carrier amplitude is above a predetermined level. this can be used to wake up the pma5110 from the power d own state by an externally applied lf signal. in the power down state, the lf carrier detector can either: ? generate a wake-up and enter the run state as soon as an lf carrier is detected (sfr bit wuf.5 [lfcd] = 1 b ) ? enable the lf baseband and the 12 mhz rc hf oscilla tor in the power down s tate to process the incoming lf signal by looking for a sync match or pattern match (sfr bits wuf.2,3 or 4 = 1 b ). if a sync match or pattern match is received, the system controller generates a wake-up and enters the run state for further data processing. note: in both cases the overall lf sensitiv ity is determined by the lf carrier detec tor, since it determines if the lf baseband is enabled or disabled. amplifier xlf lf lf-antenna attenuator agc ask de- modulator carrier detector v ctth r agc v attnthr sfr lfrx0 cdett data slicer data filter lf rx analog frond end afe sfr lfrxc to lf baseband disagc sfr lfrx1 agctcd sfr lfrx0 atr<1: 0> sfr lfrx1 df<3:0> sfr lfrx1 dstfc<1:0> sfr wuf lfcd sfr lfrxs lfraw sfr lfrxm lfht<1: 0> lfccdet<2:0> lfencdcal lfenfctc lf-signal datagram lf-rx timing agc attack time agc decay t ime datagram preamble t agcatt t agcdec
pma51xx functional description data sheet 86 revision 2.1, 2010-06-02 since the lf-signal is ask modulated a ca rrier detect hold time is specified to prolong the carrier detect signal. a minimum hold time must be set depending on the data rate using lfcdm.1-0 [lfht1-0] ( the hold time functionality is illu strated in the following figure. figure 21 lf receiver carrier detector hold time behavior 2.10.1.2.1 carrier detect or threshold calibration to achieve high sensitivity, the carrier detector has to be calibrated to compensate for possible system noise and production spread. this calib ration is enabled by setting sfr bit lf cdm.3 [lfencdcal] and is executed every time the lf receiver is switched on (either manually by sfr bit lfrxc.2 [enlfrx] or automatically by the lf on/off timer). since this is done duri ng the settling time of the lf receiver , no extra delay is required for this calibration. the carrier detector threshold level wh ich is used for this calibration can be set by sfr bits lfrx0.7-4[cdett]. attention: to stabilize the specified sensitivity s lf1 (please refer to table 38 ), the library function lfsensitivitycalibration() has to be used (please refer to [1] ). if set, sfr bit lfcdm.2 [lfenfctc] ?freez es? the calibrated threshold level. if this bit is not set, the threshold will follow the mean value of the input signal, resulting in a th reshold signal that is dep endent on the lf signal strength and length. if sfr bit lfcdm.2 [lfenfctc] is set, a periodic recalibration is required, especially at higher temperatures since the ?frozen? threshold level might drif t after the carrier detector freeze hold time (t cdcfh ). the recalibration is achieved automatically by the next off/on transition of the lf on/off timer or by disabling/enabling the lf receiver manually by sfr bit lfrxc.2 [enlfrx]. note: if the lf receiver is disabled/enabled manually at least one 2 khz rc lp oscillator period has to be wait between off and on transition to ac hieve the automatic recalibration. the following figure shows the timing behavior of the calibration. datagram preamble lf-signal datagram carrier detector hold time t cdhd carrier detector with ho ld time carrier detector output
pma51xx functional description data sheet 87 revision 2.1, 2010-06-02 figure 22 carrier detector threshold calibration timing (with ?freeze?) 2.10.1.2.2 carrier detector filtering to prevent the device from undesired carrier-de tect wake-ups and to prevent the lf baseband and 12 mhz rc hf oscillator from being enabled due to interference, an lf carrie r detector filter is implemented. sfr lfcdflt is used to determine the filtering mode and the filtering time. three lf carrier detector filtering operation modes are available: ? lfcdflt.1-0 [cdfm] = 00 b the lf carrier detector filter is swit ched off so the wake-up functiona lity will remain witho ut any filtering ? lfcdflt.1-0 [cdfm] = 10 b the lf carrier detector filter is always active - this mode is suitable for applications that use a carrier wake- up without any data transmission ? lfcdflt.1-0 [cdfm] = 01 b the lf carrier detector filter is deactivated when an on pulse is received. the preamble must contain an on pulse (lf carrier active) longer than the selected filter time to enable the lf baseband and the 12 mhz rc hf oscillator. after the on-pulse is received, the filter is disabl ed for data receiving until no more data is received. depending on the selected hold time (sfr bits lfcd m.1-0 [lfht1-0]), th e filter will be re- enabled after the last received bit. the following figure shows the behavior of the various modes. lf rx enable bit or on/off-timer lf -rx off lf- rx on lf-rx settling time datagr am preamble lf- signal datagram lf- rx timing t set = max. 2ms lf-cd threshold calibration lf-cd calibration car r ier detector with hold time carrier detector threshold and lf data signal fr eeze cali br ation thr eshold car r ier detector output freeze hold time (t cdcfh )
pma51xx functional description data sheet 88 revision 2.1, 2010-06-02 figure 23 lf receiver carrier detector filtering 2.10.2 lf receiver on/off timer an on/off timer is implemented to reduce the lf receiver current consumption in power down state. it can be enabled by sfr bit lfrxc.3 [enootim]. the lf receiver analog front end will be periodically switched on or off corresponding to the timer settings. the current state of the lf receiver (on or off) is available in sf r bit lfsyncfg.7[lfcda]. the lf receiver on/off timer incorporates a precounter (sfr lfootp) as time base and a post counter for independently setting the on time and the off time (sfr lfoot). 2.10.2.1 lf receiver on/off timer calibration the calibration process is done automatically by a library function (see [1] ). the time base is automatically calibrated to 50 ms by this function. if another (uncalibrated) time base is needed, sfr lfootp can be configured manually by using the equation shown in figure 24 . figure 24 calculation of time base for lf receiver on/off timer lf-rx on datagram preamble lf-signal datagram carrier detector output (cdfm=00b) lf baseband / 12mhz rc activity carrier detector output (cdfm=10b) lf baseband / 12mhz rc activity ft carrier detector output (cdfm=01b) lf baseband / 12mhz rc activity ft ft ft ft ft ft ht ht ht ht ht ht ht ht ft: filtering time (determined by sfr bit lfcdflt.1-0[cdft1-0]) ht: hold time (determined by sfr bit lfcdm.1-0[lfht1-0]) [] [] hz f lfootp s timebase oscillator lp rc khz 2 1 + =
pma51xx functional description data sheet 89 revision 2.1, 2010-06-02 the on time and the off time can be configured individua lly using sfr lfoot. they can be calculated using the equations shown in figure 25 and figure 26 . figure 25 calculation of on time for lf receiver on/off timer figure 26 calculation of off time fo r lf receiver on/off timer [] () [] () [] 1 1 4 1 1 4 1 2 + ? ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? + = ? ? ? ? ? ? ? ? + ? ? ? ? ? ? ? + = lfootp s timebase lfootp integer ontim hz f lfootp integer ontim s ontime oscillator lp rc khz [] () [] () [] 4 1 4 1 1 2 ? ? + = ? + ? + = s timebase offtim hz f ) lfootp ( offtim s offtime oscillator lp rc khz
pma51xx functional description data sheet 90 revision 2.1, 2010-06-02 2.10.3 lf receiver baseband processor figure 27 lf receiver baseband the lf receiver baseband processor ca n be configured to receive the following data gram formats by using the sfr bits lfsyncfg.1-0 [synm1-0]. figure 28 lf receiver baseband configurations 2.10.3.1 synchronizer a sync pattern of up to 18 chips can be specified (sfr lfsyn1, sfr lfsyn0 and sfr bits lfsyncfg.5- 4 [lfsyn17-16]) and compared to the synchronized received bit stream. the comparison takes place before decoding, so sync patterns with code violations can also be detected. code violations ar e defined to have at least three consecutive chips without level transitions. note: the sync pattern should maintain a 50/50 ratio of low / high chips to preserve a dc level of 50% and must not contain more than 3 cons ecutive chips at the same level. lf baseband processor lf datarecovery (chipmode) manchester / biphase decoder synchronizer lfdiv1 lfsyncfg. spsl sync match comparator lfsyn0 lfsyn1 lfsyncfg .lfsyn 17 - 16 lfdiv0 wakeup to systemcontroller wuf.lfsy pattern match comparator lfp 1h lfpcfg bitrate generator lfp 1l lfp0 h lfp 0l pattern 0 pattern 1 lfrxs.decerr lfrxs.lfraw lfrxc .ir xd lfrxc.csel wakeup to systemcontroller wuf.lfpm0 wakeup to systemcontroller wuf.lfpm1 lfsyncfg.synm lf receiver analog frontend 10100110 lfrxc.lfbbm data interface 8bit data buffer lfrxs.lfbp lfrxs.lfdata 1bit serial data buffer lfrxs.lfov lfrxs.lfdov lfrxd lfrxs.lfdp 01 00 synm[1: 0] 11 10 preamble (min. 2ms) sync pattern (4-18chips data #1 data #n wake-up pattern (4-16bits) preamble (min. 2ms) data #1 data #n m anchester : 0 /1 or 1 /0 tr ansition biphase : two identical chips wake-up pattern (4-16bits) preamble (min. 2ms) sync pattern (4-18chips data #1 data #n preamble (min. 2ms) data #1 data #n m anchester : 0 /1 or 1 /0 transition biphase : two identical chips
pma51xx functional description data sheet 91 revision 2.1, 2010-06-02 2.10.3.2 bit rate generator the sfr lfdiv1 and sfr lfdiv0 define the lf receiver bit rate. depending on the selected system clock, either the left or the righ t formula has to be used. figure 29 calculation of lf receiver bit rate for sync match and pattern match, the bit rate generat or is needed in power down state. the only available system clock in power down sta te is the 12 mhz rc hf oscillator. to avoid switching bit rates, the system clock should never be changed during lf reception is running. due to the drift of the 12 mhz rc hf oscillator, a calibra tion mechanism is provided as a library function and is described in [1] . this library function automatically configures sfr lfdiv0 and sfr lfdiv1. 2.10.3.3 lf data decoder the decoder can be used for manchester or biphase en coded data. if a code violation is detected sfr bit lfrxs.6 [decerr] is set to 1 b . figure 30 shows a summary of the available coding schemes and the appropriate register settings. figure 30 lf receiver data decoder schemes 2.10.3.4 wake-up pattern detector two different wake-up patterns with a length of 4, 8 or 18 bits can be stored by using sfrs lfp0h, lfp0l, lfp1h and lfp1l. sfr wum determines on which pattern (pattern 0, pattern 1, or both) a wake-up occurs. 2.10.3.5 lf receiver data interface the received data can be read by the microcont roller using the following different interfaces: ? 8 bit data byte (synchronized, manchester/biphase decoded) ? serial bit stream data (synchronized, manchester/biphase decoded) [] [] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? = ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? = s baudrate hz f / lfdiv or s baudrate hz f / lfdiv crystal oscillator hf rc mhz 1 32 0 1 1 16 0 1 12 data clock manchester inverted manchester biphase -0 biphase -1 10100110 time register configuration lfrxc.csel lfrxc.irxd 00 01 10 11 tbit 1) 1) duration of a manchester / biphase coded bit
pma51xx functional description data sheet 92 revision 2.1, 2010-06-02 ? raw data (synchronized, chip level) ? raw carrier detect (not synchronized) 2.10.3.5.1 8 bit data byte synchronized and decoded data bytes are received using sfr lfrxd. decoded bits are shifted into an 8 bit receive buffer, until a byte boundary is reached. the rece ived byte is then shifted into the sfr lfrxd, and a flag sfr bit lfrxs.3 [lfdp] is set, while th e following byte starts shifting into the receive buffer. if the sfr lfrxd is not read before the following byte is received, it will be ov erwritten and an overflow flag sfr bit lfrxs.4 [lf dov] is set. 2.10.3.5.2 serial bit stream data synchronized and decoded serial data is re ceived in the sfr bit lfrxs.0 [lfdata]. a flag sfr bit lfrxs.1 [lfbp] is set if data is pending, while the follo wing bit is buffered. if the sfr bit lfrxs.0 [lfdata] is not read bef ore the following bit is received, it will be overwritten, and an overflow flag sfr bit lfrxs.2 [lfov] is set. 2.10.3.5.3 raw data synchronized and not decoded serial data (on the ch ip level) can be read by the microcontroller using sfr bit lfrxs.5 [lfraw]. this can be used for any coding scheme. 2.10.3.5.4 raw carrier detect not synchronized and not decoded serial data can be read by the microcontroller using sfr bit lfrxs.7 [cdraw]. this indicate s if a carrier signal is currentl y present (sfr bit lfrxs.7[cdraw] = 1 b ) or not (sfr bit lfrxs.7 [cdraw] = 0 b ).
pma51xx functional description data sheet 93 revision 2.1, 2010-06-02 2.10.4 register description table 17 registers overview register short name register long name offset address wakeup value page number lfrxs lf receiver status register a4 h 00 h 105 lfrxd lf receiver data register a5 h 00 h 104 lfsyn0 lf sync pattern 0 a6 h uuuuuuuu b 106 lfsyn1 lf sync pattern 1 a7 h uuuuuuuu b 106 lfsyncfg lf sync matching configuration register af h x0uuuuuub 107 lfcdflt lf carrier dete ct filtering b2 h 00uu00uu b 94 lfdiv0 lf division factor low byte b3 h uuuuuuuu b 96 lfdiv1 lf division factor high byte b4 h 00000uuu b 96 lfcdm lf carrier detector mode b5 h uuuuuuuu b 95 lfrx1 lf receiver configuration register 1 b6 h uuuuu0uu b 102 lfrx0 lf receiver configuration register 0 b7 h uuuuuuuu b 101 lfp0l lf pattern 0 detector sequence data lsb be h uuuuuuuu b 99 lfp0h lf pattern 0 detector sequence data msb bf h uuuuuuuu b 98 lfootp lf on/off timer precounter c5 h uuuuuuuu b 98 lfoot lf on/off timer configuration register c6 h uuuuuuuu b 97 lfpcfg lf pattern detection configuration register c7 h 00000uuu b 100 lfp1l lf pattern 1 detector sequence data lsb ce h uuuuuuuu b 100 lfp1h lf pattern 1 detector sequence data msb cf h uuuuuuuu b 99 lfrxc lf receiver control register f9 h uuuuuuuu b 103
pma51xx functional description data sheet 94 revision 2.1, 2010-06-02 lf carrier detect filtering lfcdflt offset wakeup value reset value lf carrier detect filtering b2 h 00uu00uu b 00 h field bits type description res 7:6 reserved cdft 5:4 rw carrier detector filtering timer 00 b shortest filtering time 10 b short filtering time 11 b long filtering time 11 b longest filtering time res 3:2 reserved cdfm 1:0 rw carrier detector filtering mode detailed information can be found in chapter 2.10.1.2.2 . 00 b filter disabled 01 b filter disabled after on pulse received (re-enabled again 1-8ms after last bit is received, dependent on hold time determined by sfr bit lfcdm.1-0 [lfht1-0] 10 b filter always active 11 b reserved 7 0 76 res 54 rw cdft 32 res 10 rw cdfm
pma51xx functional description data sheet 95 revision 2.1, 2010-06-02 lf carrier detector mode lfcdm offset wakeup value reset value lf carrier detector mode b5 h uuuuuuuu b 00 h field bits type description lfooext 7 rw lf on-time extension on carrier detect 0 b lf on/off time is acting as configured in lfoot on page 198lfoot on page 97 and lfootp on page 98 1 b lf on time is extended as long as a lf carrier, that exceeds the threshold, is present. lfccdet 6:4 rw lf calibrate carrier detect threshold selection note: must be set to 000 b lfencdcal 3 rw lf enable carrier detect calibration 0 b lf carrier detect calibration disabled 1 b lf carrier detect calibration enabled lfenfctc 2 rw lf enable calibration threshold freeze 0 b lf calibration threshold freeze disabled 1 b lf calibration threshold freeze enabled lfht 1:0 rw lf carrier detector hold time selection 00 b 2x 2 khz rc lp oscillator period (typ. 1 ms) 01 b 4x 2 khz rc lp oscillator period (typ. 2 ms) 10 b 8x 2 khz rc lp oscillator period (typ. 4 ms) 11 b 16x 2 khz rc lp oscillator period (typ. 8 ms) 7 0 7 7 rw lfooext 64 rw lfccdet 3 3 rw lfencdc al 2 2 rw lfenfct c 10 rw lfht
pma51xx functional description data sheet 96 revision 2.1, 2010-06-02 lf division factor low byte lf division factor high byte note: these sfrs can be modified manually as well for using other (uncalibrated) bit rates. lfdiv0 offset wakeup value reset value lf division factor low byte b3 h uuuuuuuu b 00 h field bits type description lfd7_0 7:0 rw lf bit rate generator division factor bit 7 down to bit 0 lfdiv1 offset wakeup value reset value lf division factor high byte b4 h 00000uuu b 00 h field bits type description lfdcen 7 rcw lf division calibration enable note: under control of library functions res 6:3 reserved lfd10_8 2:0 rw lf bit rate generator division factor bit 10 down to bit 8 7 0 7 0 rw lfd7_0 7 0 7 7 rcw lfdcen 63 res 20 rw lfd10_8
pma51xx functional description data sheet 97 revision 2.1, 2010-06-02 lf on/off timer configuration register lfoot offset wakeup value reset value lf on/off timer configuration register c6 h uuuuuuuu b 00 h field bits type description offtim 7:4 rw off time (msb-lsb) binary weighted off time. example: if time base is set to 50ms in lf ootp the following value range is available (please refer to figure 26 ?calculation of off time for lf receiver on/off timer? on page 89 ): 0000 b 200ms ... 1111 b 3.2s ontim 3:0 rw on time (msb-lsb) binary weighted on time. example: if time base is set to 50ms in lf ootp the following value range is available (please refer to figure 25 ?calculation of on time for lf receiver on/off timer? on page 89 ): 0000 b 12.5ms ... 1111 b 200ms 7 0 74 rw offtim 30 rw ontim
pma51xx functional description data sheet 98 revision 2.1, 2010-06-02 lf on/off timer precounter lf pattern 0 detector sequence data msb lfootp offset wakeup value reset value lf on/off timer precounter c5 h uuuuuuuu b 64 h field bits type description lfootp 7:0 rw lf receiver on/off timer precounter setting lfp0h offset wakeup value reset value lf pattern 0 detector sequence data msb bf h uuuuuuuu b ff h field bits type description lfcodep015_8 7:0 rw code pattern 0 sequence bit 15 down to bit 8 7 0 7 0 rw lfootp 7 0 7 0 rw lfcodep015_8
pma51xx functional description data sheet 99 revision 2.1, 2010-06-02 lf pattern 0 detector sequence data lsb lf pattern 1 detector sequence data msb lfp0l offset wakeup value reset value lf pattern 0 detector sequence data lsb be h uuuuuuuu b ff h field bits type description lfcodep07_0 7:0 rw code pattern 0 sequence bit 7 down to bit 0 lfp1h offset wakeup value reset value lf pattern 1 detector sequence data msb cf h uuuuuuuu b ff h field bits type description lfcodep115_8 7:0 rw code pattern 1 sequence bit 15 down to bit 8 7 0 7 0 rw lfcodep07_0 7 0 7 0 rw lfcodep115_8
pma51xx functional description data sheet 100 revision 2.1, 2010-06-02 lf pattern 1 detector sequence data lsb lf pattern detection configuration register lfp1l offset wakeup value reset value lf pattern 1 detector sequence data lsb ce h uuuuuuuu b ff h field bits type description lfcodep17_0 7:0 rw code pattern 1 sequence bit 7 down to bit 0 lfpcfg offset wakeup value reset value lf pattern detection configuration register c7 h 00000uuu b 00 h field bits type description res 7:3 reserved psl 2:1 rw pattern sequence length (msb-lsb) 00 b 4 bit pattern length (l fp0l.[3:0] or lfp1l.[3:0] 01 b 8 bit pattern length (l fp0l.[7:0] or lfp1l.[7:0]) 10 b 16 bit pattern length (lfp1h.[15:8 ] / lfp1l.[7:0] or lfp0h.[15:8] / lfp0l.[7:0]) 11 b reserved psel 0 rw pattern select 0 b only wake-up pattern 0 (lfp0l and lfp0h) can generate a pattern match wake-up. 1 b both, wake-up pattern 0 (lfp0l and lfp0h) and wake-up pattern 1 (lfp1l and lfp1h) can generate a pattern match wake-up. 7 0 7 0 rw lfcodep17_0 7 0 73 res 21 rw psl 0 0 rw psel
pma51xx functional description data sheet 101 revision 2.1, 2010-06-02 lf receiver configuration register 0 the sfr lfrx0 determines the attenuation of the lf inpu t signal (sfr bit lfrx0.0 [vdiv1-0]) and the threshold for the carrier detector (sfr bits lfrx 0.7-4 [cdett3-0]). please refer to product characteristics for proper setting of these bits. lfrx0 offset wakeup value reset value lf receiver configuration register 0 b7 h uuuuuuuu b 39 h field bits type description cdett 7:4 rw carrier detector threshold level selection use pma library function lfsensitivitycalibration() to automatically configure these bits. please refer to [1] . atr 3:2 rw attenuator threshold selection note: must be set to 10 b vdiv 1:0 rw antenna voltage divider factor selection 00 b divided by 9 01 b divided by 1 10 b divided by 29 11 b reserved 7 0 74 rw cdett 32 rw atr 10 rw vdiv
pma51xx functional description data sheet 102 revision 2.1, 2010-06-02 lf receiver configuration register 1 lfrx1 offset wakeup value reset value lf receiver configuration register 1 b6 h uuuuu0uu b 31 h field bits type description agctcd 7:6 rw agc time constant decay slew rate selection note: must be set to 00 b dstfc 5:4 rw data slicer threshold filter corner frequency selection note: must be set to 00 b lfgain 3 rw lf receiver front end gain select note: must be set to 1 b res 2 reserved df 1:0 rw data filter corner frequency selection 00 b reserved 01 b recommended for a data rate of 2000/3900/4000 bit/s 10 b reserved 11 b reserved 7 0 76 rw agctcd 54 rw dstfc 3 3 rw lfgain 2 2 res 10 rw df
pma51xx functional description data sheet 103 revision 2.1, 2010-06-02 lf receiver control register lfrxc offset wakeup value reset value lf receiver control register f9 h uuuuuuuu b 00 h field bits type description cdrecal 7 rw carrier detector threshold re-calibration note: this bit must be set to 0 b disagc 6 rw disable automatic gain control (agc) 0 b agc is enabled 1 b agc is disabled lfbbm 5:4 rw lf baseband processor mode selection 00 b disabled: the entire digital part of the rece iver is disabled. the lf analog frontend including carrier detector is still active (if enabled by enlfrx) 01 b raw data recovery: the digital frontend and the synchronizer are active. data is recovered at chip level and can be handled by the microcontroller. this mode can be used for the implementation of custom coding and synchronization schemes. 10 b raw/decoded data recovery: the full lf baseband functionality including the decoding of manchester/biphase coded data is available. 11 b reserved enootim 3 rw enable on/off timer 0 b lf receiver is always on (if also enabled by enlfrx) 1 b lf receiver is controlled by on/off timer (if also enabled by enlfrx) enlfrx 2 rw enable lf receiver 0 b lf receiver disabled 1 b lf receiver enabled (controlled by enootim) irxd 1 rw invert lf receiver data 0 b data not inverted 1 b data inverted 7 0 7 7 rw cdrecal 6 6 rw disagc 54 rw lfbbm 3 3 rw enootim 2 2 rw enlfrx 1 1 rw irxd 0 0 rw csel
pma51xx functional description data sheet 104 revision 2.1, 2010-06-02 lf receiver data register csel 0 rw decoder code select irxd=0 b 0 b manchester coded data 1 b biphase 0 coded data irxd=1 b 0 b inverted manchester coded data 1 b biphase 1 coded data lfrxd offset wakeup value reset value lf receiver data register a5 h 00 h 00 h field bits type description lfrxd 7:0 r lf receiver data register field bits type description 7 0 7 0 r lfrxd
pma51xx functional description data sheet 105 revision 2.1, 2010-06-02 lf receiver status register lfrxs offset wakeup value reset value lf receiver status register a4 h 00 h 00 h field bits type description cdraw 7 r lf carrier detect raw data decerr 6 rc manchester/biphase decode error 0 b no error detected 1 b decode error detected lfraw 5 r lf receiver raw data lfdov 4 rc lf data byte overwritten 0 b no error detected 1 b lf data byte overwritten lfdp 3 rc lf data byte pending if this bit is set lf data can be read from lfrxd lfov 2 rc lf serial decoded data overwritten 0 b no error detected 1 b lf serial decoded data overwritten lfbp 1 rc lf serial decoded data pending if this bit is set new lf serial decoded data is available at lfdata since the last read access to lfrxs lfdata 0 r lf serial decoded data 7 0 7 7 r cdraw 6 6 rc decerr 5 5 r lfraw 4 4 rc lfdov 3 3 rc lfdp 2 2 rc lfov 1 1 rc lfbp 0 0 r lfdata
pma51xx functional description data sheet 106 revision 2.1, 2010-06-02 lf sync pattern 0 lf sync pattern 1 lfsyn0 offset wakeup value reset value lf sync pattern 0 a6 h uuuuuuuu b ff h field bits type description lfsyn7_0 7:0 rw lf sync pattern chip 7 - chip 0 lfsyn1 offset wakeup value reset value lf sync pattern 1 a7 h uuuuuuuu b ff h field bits type description lfsyn15_8 7:0 rw lf sync pattern chip 15 - chip 8 7 0 7 0 rw lfsyn7_0 7 0 7 0 rw lfsyn15_8
pma51xx functional description data sheet 107 revision 2.1, 2010-06-02 lf sync matching configuration register lfsyncfg offset wakeup value reset value lf sync matching configuration register af h x0uuuuuu b 38 h field bits type description lfcda 7 r lf receiver on/off indicator 0 b lf receiver is currently off 1 b lf receiver is currently on res 6 reserved lfsyn17 5 rw sync pattern sequence chip 17 lfsyn16 4 rw sync pattern sequence chip 16 spsl 3:2 rw sync pattern sequence length (msb-lsb) 00 b 4 chips sync pattern length (lfsyn0.[3:0]) 01 b 8 chips sync pattern length (lfsyn0.[7:0]) 10 b 16 chips sync pattern length (lfsyn1.[7:0] and lfsyn0.[7:0]) 11 b 18 chips sync pattern length (lfsyncfg.[5:4], lfsyn1.[7:0] and lfsyn0.[7:0]) synm 1:0 rw lf synchronizer mode detailed information can be found in chapter 2.10.3.1 . 00 b synchronization with 0/1 or 1/ 0 transition (manchester) or 2 consecutive chips with same leve l (biphase). set wake-up mask sfr wum for carrie r detect wake-up. 01 b synchronization with sync pattern. set wake-up mask sfr wum for sync match wake-up. 10 b synchronization with 0/1 or 1/ 0 transition (manchester) or 2 consecutive chips with same level (biphase) and a subsequent wake-up pattern. set wake-up ma sk sfr wum for pattern match wake-up. 11 b synchronization with sync pattern and wake-up pattern. set wake- up mask sfr wum for sync match and/or pattern match wake-up. 7 0 7 7 r lfcda 6 6 res 5 5 rw lfsyn17 4 4 rw lfsyn16 32 rw spsl 10 rw synm
pma51xx functional description data sheet 108 revision 2.1, 2010-06-02 2.11 sensor interfaces and data acquisition the pma5110 has two internal sensors to acquire enviro nmental data, two highly sensitive differential analog interfaces with 4 programmable gain factors (from 76 +-20 %, 60 +-20 %, 50 +-20 % and 38 +-20 % ), and one standard differential analog interface (gain factor 1): ? temperature sensor ? battery voltage monitoring ? external data through analog interface the analog data is acquired and digitalized by the in ternal 10-bit adc. measur ement routines for acquiring temperature and battery voltage data are available within the function library that is described in [1] . 2.11.1 sensor interface figure 31 block diagram of the sensor interface the sensor interface connects to the external sensors and to the internal (on-chip) temperature and battery- voltage sensors. sensor interface v1p (sens.) temperature sensor a d c internal reference voltage battery sensor control logic vreg sensor channel 3 channel 2 channel 1 amux2 amux1 mux channel 0 channel 7 channel 6 channel 5 channel 4 ch0p,ch0n ch1p,ch1n ch4p,ch4n ch3p,ch3n ch2p,ch2n ch5p,ch5n ch6p ,ch6n ch7p,ch7n external sensor interface standard sensor interface v1n (sens.) vdd (sens.) v2n (sens.) v2p (sens.)
pma51xx functional description data sheet 109 revision 2.1, 2010-06-02 all signal channels can be configured for differential or single-ended operation. differential operation is only recommended for signals in which the common-mode volta ge is stable, while the positive and negative signal voltages vary symmetrically around the common-mode voltage. the input multiplexer selects one cha nnel for the input signal and one channel for the reference voltage to the adc. any channel can be selected as the reference except channels 6 and 7, which are specially adapted to the low-level signals from external sensors. 2.11.1.1 two differential highly sens itive interfaces to external sensors differential highly sensitive sensor interface 1 (channel 6) v1p/v1n are the positive/negative differential voltage inputs. differential highly sensitive sensor interface 2 (channel 7) v2p/v2n are the positive/negative differential voltage inputs. channel gain selection the sfr bit adcc1.5-4 [gai n1-0] gain factor selection a llows the selection of the sens itivity of the analog input channels 6 and 7. the gain factor is one for all other input channels (see table 18 ?selection of the gain factor? on page 109 ). sensor excitation sensors connected to channel 6 or 7 can have their s upply voltages provided by the pma5110. for channel 6, connect the supply terminals of the sensor between vdd(sens) and vm1 (pin 3). for channel 7, use vdd(sens) and vm2. the supply is switched on only when a measur ement of the corresponding channel is done. a settling time delay between sensor power-on and measurement can be programmed, refer to chapter 2.11.4.1.2 . wheatstone bridge sensor connection wheatstone bridges can be used to set the oper ating point of external sensors, if needed. figure 32 ?wheatstone bridge sensor connection? on page 110 shows the connection of two wheatstone bridges to the differential high sensitivity sensor interf aces 1 and 2 (channel 6 and channel 7). table 18 selection of the gain factor gain factor (gain) channel adcm.cs2-0 gain1 gain0 76 +/- 20% 11x 0 0 60 +/- 20% 11x 0 1 50 +/- 20% 11x 1 0 38 +/- 20% 11x 1 1 1others00 1others01 1others10 1others11
pma51xx functional description data sheet 110 revision 2.1, 2010-06-02 figure 32 wheatstone bridge sensor connection 2.11.1.2 interface to other signals battery-voltage interface (channel 0) the positive input to the battery-voltage signal is derived by dividing voltage v bat by 3.5. the negative input is connected to gnd. the battery volta ge is converted with a resolution of ap proximately 4.1 mv, using an internal reference voltage of 1210 mv (channel 3) as a reference. temperature-sensor interface (channel 1) the temperature signal to the adc is a single-ended si gnal, with a temperature-s ensitive voltage between 500 and 1100 mv. the temperature-sensor signal is digiti zed with a resolution of appro ximately 0.5c, using an internal reference voltage of 1210 mv (channel 3) as a reference. standard-sensor interface (channel 2) the positive input signal must be applied at amux1, and the negative input at amux2. v1p vm1 v1n vdd(s ens ) v2p vm2 v2n
pma51xx functional description data sheet 111 revision 2.1, 2010-06-02 2.11.1.3 reference voltages when channel 6 or 7 is selected as input to the adc, the reference voltage should be identical to the supply voltage of the sensor bridge, in order to get correct rati ometric operation. if the sensor bridge is connected between the vdd(sens) and vm1 (or vm2) pins of the pma5110, channel 5 will prov ide the correct reference voltage. if the sensor is supplied by external power, the positiv e and negative supply voltages of the sensor bridge should be connected to channel 2, and this channel should be used as a reference (see figure 33 ). the supply voltage of the sensor must always be within the range gnd to v reg . figure 33 external sensor use channel 2 as reference voltage 3 channels on the adc input multiplexer carry voltages th at are intended as reference voltages for the converter: internal reference voltage (channel 3) this reference is a nominal voltage of 1210 mv. it is intended as a reference for the temperature and v bat measurements. vreg reference (channel 4) this reference is the v reg voltage. this is the highest allowable in put voltage to the adc, and is meant as a reference for the test signal, to allo w as large a test signal as possible. bridge supply refe rence (channel 5) when channel 6 or 7 is selected as the input to the adc, the reference voltage is the bridge supply voltage. a multiplexer selects the appropriate negative bridge supply . this reference must be used with the ratiometric sensors in order to achieve an accuracy that is independent of the battery voltage. 2.11.2 temperature sensor temperature measurement is performed by a dedicated library function. see temperature sensor characteristics for the sensor specification. 2.11.3 battery voltage monitor battery voltage measurement is perf ormed by a dedicated library function. see battery sensor characteristics for the sensor specification. pma 71xx amux1 amux2 v1n v1p external power supply sensor bridge
pma51xx functional description data sheet 112 revision 2.1, 2010-06-02 2.11.4 analog to digital converter (adc) the adc is a fully differential charge-balancing 10-bi t converter. it uses a te chnique known as redundant successive approximation, which requires 12 decisions to arrive at a 10-bit result. the redundancy means that the ranges of the successive approximation partially over lap, making the conversion more robust to noise. the adc can perform sub conversions with any number of bits. this means that the charge redistribution is done with the result of the previous conversion as a starti ng point, and doing the comparator decisions only for the selected number of less significant bit positions. a digitally controlled attenuator allows the gain setting of the highly sensitiv e adc inputs. at adc inputs, inverters are used to perform two identical conversions with inve rted comparator input signals to compensate comparator offset digitally. they are controlled by the sfr bit adcc1.6 [csi] (see adc configuration register 1 ). if the average of the 2 measurements is taken, the offset of the comparator is canceled. 2.11.4.1 adc timing figure 34 adc timing diagram (standard conversion) adc power (vadc) must be turned on (using cfg2.3 [pdadc]) before the adc is enabled (using cfg1.3 [adcen]). ad conversions can then be started by setting adcm.7 [adcstart] to 1 b . adcm.3 [sbsen] can be used to enable the wheatstone bridge supply if needed. the timing diagram of a conversion is shown above. adc-start and all other control signals are latche d with the following rising edge of the adc-clock. this generates the status bits adcs.0 [b usy] as well as adcs.1 [sample] wh ich indicates the sample and hold activity of the channel input signal s. the result registers adcdh and adcdl are written at the same time. with the next rising edge of the adc-clock the result bits ar e stable. adc power (vadc) can then be turned off again a d c - c l o c k ? ? s f r a d c m . 7 [ a d c s t a r t ] ? ? s f r a d c c 0 . 6 - 4 [ t v c ] s f r a d c c 0 . 2 - 0 [ s t c ] s f r a d c c 1 . 7 [ s e d c ] s f r a d c c 1 . 6 [ c s i ] s f r a d c c 1 . 5 - 4 [ g a i n ] s f r a d c c 1 . 3 [ f c n s c ] s f r a d c c 1 . 2 - 0 [ s u b c ] s f r a d c m . 6 - 4 [ r v ] s f r a d c m . 3 [ s b s e n ] s f r a d c m . 2 - 0 [ c s ] s f r a d c o f f . 5 - 0 [ o f f 5 _ 0 ] don't care ? s f r a d c s . 0 [ b u s y ] ? s f r a d c s . 1 [ s a m p l e ] ? s f r a d c s . 6 [ s a r s a t l ] s f r a d c s . 5 [ s a r s a t h ] s f r a d c s . 4 [ c l 0 0 0 ] s f r a d c s . 3 [ c g 3 f f ] s f r a d c s . 1 [ s a m p l e ] ? s f r a d c d l s f r a d c d h result of current conversion result of previous conversion ? ? s f r c f g 1 . 3 [ a d c e n ] s f r c f g 2 . 3 [ p d a d c ]
pma51xx functional description data sheet 113 revision 2.1, 2010-06-02 by setting cfg2.3 [pdadc]. only the ana log part of the adc is powered off, thus the result register will not be affected thereby. 2.11.4.1.1 clock divider an adc clock divider allows the adaption of the adc speed to the cpu8051 and peripheral units clock f cpu . the clock divider factor settings are selected by adcc 0.6-4 [tvc]. the adc clock frequency is calculated with equation shown in figure 35 . figure 35 adc frequency calculation 2.11.4.1.2 sample time delay the sample time delay (sample time adjustment factor stc) of the analog input channel is selected by the bits adcc0.2-0 [stc2-0]. the sample time t sample of the analog input channels can be calculated using the formula shown in figure 36 ?adc sample time delay? on page 113 . figure 36 adc sample time delay the scheme of sample time generation is drawn in figure 37 ?generation of adc clock and the sample time signal? on page 113 . figure 37 generation of adc clock and the sample time signal 2.11.4.1.3 conversion time the adc conversion time has three contributors. first, the sample time where the input signal voltage level is stored in the sampling capacitors. se cond, the successive approximation to determine the output code. a full conversion needs 12 adc clock cycles to produce a 10 bit conversion result. third, 2 cpu clock cycles f cpu to synchronize all input and output signals to the interface. the conversion time is calc ulated with the formula shown in figure 38 ?calculation of the adc conversion time using full conversion? on page 114 . tvc ] hz [ f ] hz [ f cpu adc = tvc .. adcc0.6-4 [tvc] stc tvc ] hz [ f ] s [ t cpu sample ? ? = 1 tvc .. adcc0.6-4 [tvc] stc .. adcc0.2-0 [stc] f cpu adc-clock control sample time control sample f adc t v c stc
pma51xx functional description data sheet 114 revision 2.1, 2010-06-02 figure 38 calculation of the adc conversion time using full conversion sub conversions with reduced length need less adc clo ck cycles. the conversion time for sub conversions is calculated with the formula shown in figure 39 ?calculation of the adc conversion time using sub conversion? on page 114 . figure 39 calculation of the adc conversion time using sub conversion 2.11.4.2 adc configuration 2.11.4.2.1 reference- and si gnal voltage selection the input multiplexer of the adc is used for selection of both reference voltage (see sfr bit adcm.6-4 [rv2-0]) and signal voltage (see sfr bit adcm.2-0 [cs2-0]). 2.11.4.2.2 single ended / differential conversion in order to obtain the highest accuracy, single-ended conver sion must be used for channels 0 - 2. in single-ended conversion, only the positive input of the selected chan nel is used, the negative i nput is connected to gnd internally. the high sensitivity inputs (channel 6 and 7) must be used in the differential mode. 2.11.4.2.3 comparator signal inversion the adcc1.6 [csi] inverts the polarity of the comparator with respect to the signal. by averaging two conversions with opposite polarity, the comp arator offset is eliminated. 2.11.4.2.4 channel gain selection the adcc1.5-4 [gain1-0] gain factor selection allows the selection of the sensitivity of the analog input channels 6 and 7. the gain is one for all other input channels 2.11.4.2.5 full conversi on or sub conversion the adcc1.3 [fcnsc] allows the selection of a conversion of all bits of the code range (10 bits, full conversion) or of a reduced number of bits (sub conversion). the number of bits is chosen by the bits adcc1.2-0 [subc]. all higher bits are taken from the result of the previous conversion. the adc state mach ine automatically subtracts half of the sub conversion range from the result of the previous conversion. therefore the signal values can vary between the value of the previous conversion minus half of the weight of the sub conv ersion range to the value of the previous conversion plus half of th e weight of the sub conversion range. 2.11.4.2.6 analog offset correction of the wheatstone bridge signals in order to use the full adc input range to convert the sensor signals, it is desirable to perform a correction of the output voltage from the connected wheatstone bridge. t he correction can be viewed as a constant voltage which is added to the wheatstone bridge output. the impl ementation takes advantage of the differential charge ) ) stc ( tvc ( ] hz [ f ] s [ t cpu conv 2 12 1 + + ? ? = tvc .. adcc0.6-4 [tvc] stc .. adcc0.2-0 [stc] ) ) subc stc ( tvc ( ] hz [ f ] s [ t cpu conv 2 1 + + ? ? = tvc .. adcc0.6-4 [tvc] stc .. adcc0.2-0 [stc] subc .. adcc1.2-0 [subc]
pma51xx functional description data sheet 115 revision 2.1, 2010-06-02 redistribution structure of the adc, by adding additional capacitor arrays for the offset correction. the analog offset correction performs two functions 1. cancel the major part of the sensor's offset voltage. 2. position the sensor signal so that it utilizes the full input range of the adc. it is also possible to operate the adc with zero offset correction. the bits adcoff.5-0 [off5-0] allow the selection of an ana log offset correction to t he analog input voltage. the offset is a function of the reference voltage, the bits adcoff.5-0 [off5-0] parameter and a fixed gain factor of 1/50. the number format is 2?s complement. the offset value can be calcul ated with the formula shown in figure 40 ?adc offset voltage calculation? on page 115 . figure 40 adc offset voltage calculation the offset gain factor (goff) is determined by the selection of input channel (adcm.2-0[cs]) and input gain (adcc1.5-4[gain]) as described in table 18 ?selection of the gain factor? on page 109 . the reference voltage u ref is the input voltage of the selected re ference voltage source (adcm.6-4[rv2-0]). 2.11.4.3 adc conversion result the adc conversion result (result code ) data format is binary unsigned and stored in adch and adcl. the type of single ended/differential conversion is se lected with bit adcc1.7[sedc]. the result of a single ended/differential conversion can be ca lculated with the formulas shown in figure 41 ?calculation of single ended conversion? on page 115 and figure 42 ?calculation of differential conversion? on page 115 . the truncation function takes the integer value of the calculation. the gain fa ctor is obtained from table 18 ?selection of the gain factor? on page 109 . u channel is the voltage at the selected input channel. for u offset voltage calculation see figure 40 ?adc offset voltage calculation? on page 115 . figure 41 calculation of single ended conversion figure 42 calculation of differential conversion output status bits the adc provides separate status bits for underflow and overflow after the conversion. the output value remains at the maximum value in case of an ov erflow, and at the minimum value in case of an underflow. all status bits are defined in adcs and are active high. ? ? ? ? ? ? ? ? ? ? ? = = )) ( off ( ) i ( off goff u u i i ref offset 5 2 2 50 32 5 4 0 off .. adcoff.5-0 ? ? ? ? ? ? ? ? + ? ? = ref offset channel code u u u gain trunc result 10 2 ? ? ? ? ? ? ? ? + ? ? + = ref offset channel code u u u gain trunc result 9 9 2 2
pma51xx functional description data sheet 116 revision 2.1, 2010-06-02 2.11.5 register description adc configuration register 0 table 19 registers overview register short name register long name offset address wakeup value page number adcm adc mode register d2 h 77 h 120 adcs adc status register d3 h 00 h 122 adcdl adc result register low byte d4 h 00 h 119 adcdh adc result register high byte d5 h 00 h 119 adcoff adc input offset c-network configuration da h 00 h 121 adcc0 adc configuration register 0 db h 00 h 116 adcc1 adc configuration register 1 dc h 00 h 118 adcc0 offset wakeup value reset value adc configuration register 0 db h 00 h 00 h field bits type description res 7 reserved tvc 6:4 rw internal clock divider 000 b divider factor 8 001 b divider factor 10 010 b divider factor 12 011 b divider factor 14 100 b divider factor 16 101 b divider factor 18 110 b divider factor 20 111 b divider factor 1 res 3 reserved 7 0 7 7 res 64 rw tvc 3 3 res 20 rw stc
pma51xx functional description data sheet 117 revision 2.1, 2010-06-02 stc 2:0 rw sample time adjustment 000 b 2 periods of adc clock 001 b 4 periods of adc clock 010 b 5 periods of adc clock 011 b 6 periods of adc clock 100 b 7 periods of adc clock 101 b 8 periods of adc clock 110 b 12 periods of adc clock 111 b 16 periods of adc clock field bits type description
pma51xx functional description data sheet 118 revision 2.1, 2010-06-02 adc configuration register 1 adcc1 offset wakeup value reset value adc configuration register 1 dc h 00 h 00 h field bits type description sedc 7 rw single ended or differential conversion 0 b single ended conversion 1 b differential conversion csi 6 rw comparator signal inversion 0 b signal inversion off 1 b signal inversion on gain 5:4 rw gain setting of channel 7-6 (see table 18 ) all other channels have gain one. 00 b gain factor 76 +/-20% 01 b gain factor 60 +/-20% 10 b gain factor 50 +/-20% 11 b gain factor 38 +/-20% fcnsc 3 rw full conversion or sub conversion 0 b sub conversion (reduced number of bits converted (see subc)) 1 b full conversion (all bits are determined) subc 2:0 rw sub conversion number of converted bits. the result of the previous conversion acts as offset for the current conversion. 000 b 2 bits converted 001 b 3 bits converted 010 b 4 bits converted 011 b 5 bits converted 100 b 6 bits converted 101 b 7 bits converted 110 b 8 bits converted 111 b 9 bits converted 7 0 7 7 rw sedc 6 6 rw csi 54 rw gain 3 3 rw fcnsc 20 rw subc
pma51xx functional description data sheet 119 revision 2.1, 2010-06-02 adc result register high byte adc result register low byte adcdh offset wakeup value reset value adc result regist er high byte d5 h 00 h 00 h field bits type description res 7:2 reserved adcdh 1:0 r adc conversion data bit 9 - bit 8 adcdl offset wakeup value reset value adc result register low byte d4 h 00 h 00 h field bits type description adcdl 7:0 r adc conversion data bit 7 - bit 0 7 0 72 res 10 r adcdh 7 0 7 0 r adcdl
pma51xx functional description data sheet 120 revision 2.1, 2010-06-02 adc mode register adcm offset wakeup value reset value adc mode register d2 h 77 h 77 h field bits type description adcstart 7 rcw adc conversion start 0 b idle 1 b adc starts conversion. bi t is cleared automatically rv 6:4 rw reference voltage selection 000 b battery sensor signal (channel 0) 001 b temperature sensor signal (channel 1) 010 b standard differential analog in terface amux1, amux2 (channel 2) 011 b internal reference voltage (channel 3) 100 b v reg sensor signal (channel 4) 101 b wheatstone bridge supply - vdd sens (channel 5) 110 b reserved 111 b reserved sbsen 3 rcw sensor bridge supply enable 0 b sensor bridge supply disabled 1 b sensor bridge supply enabled . bit is cleared automatically cs 2:0 rw analog channel selection 000 b battery sensor signal (channel 0) 001 b temperature sensor signal (channel 1) 010 b standard differential analog in terface amux1, amux2 (channel 2) 011 b internal reference voltage (channel 3) 100 b v reg sensor signal (channel 4) 101 b wheatstone bridge supply - vdd sens (channel 5) 110 b differential high sensit ivity input 1 (channel 6) 111 b differential high sensit ivity input 2 (channel 7) 7 0 7 7 rcw adcstar t 64 rw rv 3 3 rcw sbsen 20 rw cs
pma51xx functional description data sheet 121 revision 2.1, 2010-06-02 adc input offset c-network configuration adcoff offset wakeup value reset value adc input offset c-network configuration da h 00 h 00 h field bits type description off5 7:6 r adc input offset compensa tion copy of bit 5 these two bits are set automatically by hardware and always have the same value as off.5. this is neede d for correct representation of 2?s complement for all 8 bits of this register. off5_0 5:0 rw adc input offset compensa tion networ k selection the offset voltage can be calculated with the offset value (off) using formula figure 40 ?adc offset voltage calculation? on page 115 . the number format of the offset value (off) is 2?s complement. 000000 b 00 h 000001 b 01 h 000010 b 02 h ... 011110 b 1e h 011111 b 1f h 100000 b -20 h 100001 b -1f h 100010 b -1e h ... 111110 b -02 h 111110 b -01 h 7 0 76 r off5 50 rw off5_0
pma51xx functional description data sheet 122 revision 2.1, 2010-06-02 adc status register adcs offset wakeup value reset value adc status register d3 h 00 h 00 h field bits type description res 7 reserved sarsatl 6 r negative saturation of sar sarsath 5 r positive saturation of sar cl000 4 r saturation of c-net control word 000 h saturation of c-net control word cg3ff 3 r saturation of c-net control word 3ff h saturation of c-net control word res 2 reserved sample 1 r sample/hold 0 b hold 1 b sample busy 0 r busy 0 b conversion finished 1 b conversion running 7 0 7 7 res 6 6 r sarsatl 5 5 r sarsath 4 4 r cl000 3 3 r cg3ff 2 2 res 1 1 r sample 0 0 r busy
pma51xx functional description data sheet 123 revision 2.1, 2010-06-02 2.12 16 bit crc (cyc lic redundancy check) generator/checker crc is a powerful method to detect errors in data packe ts that have been transmitted over a distorted connection. the crc generator/checker divides each byte of a transmi tted/received data packet by a polynomial, leaving the remainder, which represents the checksum. the crc generator/checker uses th e 16-bit ccitt polynomial 1021 h (x 16 +x 12 +x 5 +1). the 16-bit start value is determined by sfr crc0 and sfr crc1. the crc generator/checker can process 8-bit parallel and/or serial data. figure 43 gives an overview over the crc generator/checker. a crc generation and crc checking example can be found in figure 44 . figure 43 crc (cyclic redundancy check) generator/checker figure 44 crc (cyclic redundancy check) generator/checker example 2.12.1 byte-aligne d crc generation crc generation is done by ex ecuting the following steps: ? the crc shift register has to be initialized by writing a st art value to both sfr crc0 and sfr crc1. if the crc shift register is not init ialized, the default value is 00 h . ? the data bytes which are used for the crc generation ha ve to be shifted one after the other into the sfr crcd. the process of crc generation is automati cally invoked when data bytes are written to the sfr crcd. crc shift register / logic crc-data 8 bit sfr crcc crcsd msb sfr crcd data st ro b e crc-ccitt sfr crcr1 sfr crcr0 crcss crc- result <15 :8 > crc-result <7:0> polynomial = 0 x1021 sfr crcs crcvalid 0xab 0x02 0x04 0xcc 0x00 0xb5 0x06 0xff 0xff 0xab 0x02 0x04 0xcc 0x00 0x00 0x00 0xff 0xff 0xb5 0x06 preload value crc1 crc0 example data resulting crc16 crc1 crc0 preload value example data incl . checksum resulting crc16 crc1 crc0 crc1 crc0 crc generation (transmitter side) crc checking (receiver side) append checksum to transmitted data 0xb5 0x06 (crcc.crcvalid = 1)
pma51xx functional description data sheet 124 revision 2.1, 2010-06-02 ? the resulting checksum is available in the crc resu lt register sfr crc0 and sf r crc1 after the last data byte has been processed. 2.12.2 byte-aligne d crc checking crc checking is done by executing the following steps: ? the crc shift register has to be init ialized by writing the init ialization value of the crc generation process to both sfr crc0 and sfr crc1. ? the data bytes which should be checked have to be shi fted one after the other into the sfr crcd. it is important that the order (msb-lsb) is the same as it was during crc generation. the process of crc checking is automatically invoked when data bytes are written to the sfr crcd. ? the 16-bit crc value is written to the sfr crcd beginning with the high byte after processing all user data. ? the sfr bit crcc.1[crcvalid] indicates the correctness of the crc calculation after the last data byte has been processed and both sfr crc0 and sfr crc1 are 0. 2.12.3 serial bit stream crc generation/checking the crc generator/checker features an additional seri al mechanism to perform crc generation and checking of non-byte-aligned data streams. in this case sfr bit crcc.5[crcss] and sfr bit crcc.6[crcsd] are used instead of sfr crcd. the data stream is written bit-by-b it into sfr bit crcc.6[crcsd]. each bi t is processed by forcing the flag sfr bit crcc.5[crcss] to 1 b . the following figure shows an ex ample of the usage of sfr bit crcc. 5[crcss] and sfr bit crcc.6[crcsd]. figure 45 example of serial crc generation/checking note: the serial and byte-aligned generation/checki ng mechanism is interchangeable within the same generation/checking process. for ex ample, if a data packet consists of 18 bits, then 16 bits can be processed byte-aligned via sfr crcd and the two rema ining bits can be processe d bit-aligned by using sfr bit crcc.5[crcss] and sfr bit crcc.6[crcsd]. crcc.6 [crcsd] data to be encoded 0 1 1 0 0 0 1 0 1 1 1 0 0 crcc.5 [crcss]
pma51xx functional description data sheet 125 revision 2.1, 2010-06-02 2.12.4 register description crc control register table 20 registers overview register short name register long name offset address wakeup value page number crcc crc control register a9 h 02 h 125 crcd crc data register aa h 00 h 126 crc0 crc shift register low byte ac h 00 h 126 crc1 crc shift register high byte ad h 00 h 127 crcc offset wakeup value reset value crc control register a9 h 02 h 02 h field bits type description res 7 reserved crcsd 6 rw crc serial data crcss 5 rw crc serial data strobe use crcss to serial strobe data bit crcsd into crc encoding/decoding procedure. 0 b no calculation cycle is done 1 b one calculation cycle is done with every write access to crcsd or crcss res 4:2 reserved crcvalid 1 r crc valid is set by hardware on valid crc results, that means all crc-bits are 0 0 b crc result invalid (at least one bit in crc0 or crc1 is 1 b ) 1 b crc result valid (all bits in crc0 and crc1 are 0 b ) res 0 reserved 7 0 7 7 res 6 6 rw crcsd 5 5 rw crcss 42 res 1 1 r crcvali d 0 0 res
pma51xx functional description data sheet 126 revision 2.1, 2010-06-02 crc data register crc shift regi ster low byte crcd offset wakeup value reset value crc data register aa h 00 h 00 h field bits type description crcd 7:0 rw crc data register crc0 offset wakeup value reset value crc shift regist er low byte ac h 00 h 00 h field bits type description crc7_0 7:0 rw crc shift register bit 7 down to bit 0 7 0 7 0 rw crcd 7 0 7 0 rw crc7_0
pma51xx functional description data sheet 127 revision 2.1, 2010-06-02 crc shift register high byte crc1 offset wakeup value reset value crc shift register high byte ad h 00 h 00 h field bits type description crc8_15 7:0 rw crc shift register bit 15 down to bit 8 7 0 7 0 rw crc8_15
pma51xx functional description data sheet 128 revision 2.1, 2010-06-02 2.13 8 bit pseudo random number generator for many applications, a pseudo-random number generator is needed, e.g. to vary the interval period between transmissions. for this purpose, a maximum length linear feedback shift register (mlfsr) is available as a hardware unit. a user-defined start value (except 00 h ) can be written to sfr rngd. th e default value after startup is 55 h . with every read access to sfr rngd a new pseudo-random number is generated. 2.13.1 register description random number generator data register rngd offset wakeup value reset value random number genera tor data register ab h uuuuuuuu b 55 h field bits type description rngd 7:0 rw random number generator data register 7 0 7 0 rw rngd
pma51xx functional description data sheet 129 revision 2.1, 2010-06-02 2.14 timers the pma51xx comprises four independent 16-bit timers. timers 0/1 operate as up-counters, and timers 2/3 operate as down-counters. 2.14.1 timer 0 and timer 1 timer/counter 0 and 1 are fully compatible with timer/ counter 0 and 1 of the standard 8051 microcontroller. timer 0/1 operate as up-counters and use the selected system clock divided by 6. 2.14.1.1 basic timer operations the external inputs pp1 and pp9 can be programmed to function as a gate for time r/counters 0 and 1 to facilitate pulse-width measurements. each timer consists of two 8-bit registers (th0 and tl0 for timer/counter 0, th1 and tl1 for timer/counter 1) that may be combined to one timer configuration depending on the mode that is established. the functions of the timers are controlled by two sfrs , tcon and tmod. the operating modes are described and shown for timer 0. if not explic itly noted, this applies also to timer 1. setting the sfr bit tcon.4[tr0] (respectively sfr bit tcon .6[tr1]) starts timer 0 (resp. timer 1). it counts using the selected clock (see sfr tmod) until t he timer has an overflow. sfr bit tcon.5[tf0] (resp. sfr bit tcon.7[tf1] is set. if the selected timer mode uses ti mer reload, then the timer is automatically reloaded and restarted. if the selected timer mode does not use timer reload , the timer is stopped and sfr bit tcon.4[tr0] (resp. sfr bit tcon.6[tr1]) is cleared. 2.14.1.2 timer modes timer/counter 0 and 1 can be used in the following four operating modes: ? mode 0: 8 bit timer/counter with a divide-by-32 pres caler (13 bit timer register: 8 bit + 5 bit prescaler) ? mode 1: 16 bit timer/counter ? mode 2: 8 bit timer/counter with 8 bit auto-reload ? mode 3: timer/counter 0 is configured as one 8 bit timer/counter and one 8 bit counter counting machine cycles.timer/counter 1 in this mode holds its count. the effect is the same as setting tr1 = 0. 2.14.1.2.1 timer/counter 0/1 - mode 0 figure 46 ?timer/counter 0, mode 0, 13-bit timer/counter? on page 129 shows the mode 0 operation. figure 46 timer/counter 0, mode 0, 13-bit timer/counter osc tl0 (5 bits) th0 (8 bits) tcon.5 [tf0] interrupt timer 0 & tcon4.[tr0] 1 tmod.2[t0c/t] t0gate/pp0 t0count/pp1 tmod3.[t0gate] 1 1 _ > - :6 0 & ie.1[et0] ie.7[ea]
pma51xx functional description data sheet 130 revision 2.1, 2010-06-02 2.14.1.2.2 timer/counter 0/1 - mode 1 mode 1 is equal to mode 0 but in mode 1, th e timer register is running with all 16 bits. 2.14.1.2.3 timer/counter 0/1 - mode 2 mode 2 configures the timer register as an 8-bit counter in tl0 (resp. tl1) with automatic reload, as shown in figure 47 ?timer/counter 0, mode 2: 8-bit ti mer/counter with auto-reload? on page 130 . overflow from tl0 (resp. tl1) not only sets tcon.5 [tf0 ] (resp. tcon.7 [tf1]), but also relo ads tl0 (resp. tl1) with the contents of th0 (resp. th1), which is pr eset by software. the reload leaves th0 (resp. th1) unchanged. figure 47 timer/counter 0, mode 2: 8-bit timer/counter with auto-reload 2.14.1.2.4 timer/counter 0/1 - mode 3 mode 3 has different effects on timer 0 and timer 1. timer 1 in mode 3 simply holds its count. the effect is the same as setting tcon.6 [tr1]=0. timer 0 estab lishes tl0 and th0 as two separate counters ( figure 48 ?timer/counter 0, mode 3: two 8-bit timers/counters? on page 131 ). tl0 uses the timer 0 control bits: tmod.2 [t0c/t], tmod.3 [t0gate], tc on.4 [tr0], tcon.5 [tf0] and the pin status of pp0. th0 is locked into a timer function (counting machine cycles) and take s over the use of tcon.6 [tr1] and tcon.7 [tf1] from timer 1. thus, th0 now controls the time r 1 interrupt. mode 3 is provided for applications requiring an extra 8-bit timer or counter. when timer 0 is in mode 3, timer 1 can be turned on and off by switching it out of and into its own mode 3, or in fact, in any application not requiring an interrupt from timer 1 itself. tl0 (8 bits) th0 (8 bits) tcon.5 [tf0] reload osc & tcon4.[tr0] 1 tmod.2[t0c/t] t0gate/pp0 t0count/pp1 tmod3.[t0gate] 1 1 _ > - :6 0 interrupt timer 0 & ie.1[et0] ie.7[ea]
pma51xx functional description data sheet 131 revision 2.1, 2010-06-02 figure 48 timer/counter 0, mode 3: two 8-bit timers/counters 2.14.1.3 timer/counter 0/1 interrupt support this module supports interrupt generat ion on overflow of timer/counter 0 as well as timer/counter 1. in addition to these timer/counter interr upts, two external interrupts are handled by this unit (ref. to standard 8051). on overflow of the up counting timer/counter from all 1 b to all 0 b , the flag tcon.5 [tf0] or tcon.7 [tf1] is set by hardware. these flags acts as interrupt request flags. a 1 b indicates a pending interrupt request. these flags are cleared by hardware as on standard 8051 when the corres ponding interrupt vector has been fetched by the cpu. 2.14.1.4 register description table 21 registers overview register short name register long name offset address wakeup value page number tcon timer control register timer 0/1 88 h 00 h 132 tmod timer mode register timer 0/1 89 h 00 h 135 tl0 timer 0 register low byte 8a h 00 h 134 tl1 timer 1 register low byte 8b h 00 h 134 th0 timer 0 register high byte 8c h 00 h 133 th1 timer 1 register high byte 8d h 00 h 133 tcon.5 [tf0] interrupt timer 0 tcon.7 [tf1] interrupt timer 1 tcon. 6[ tr1] osc & tcon4.[tr0] 1 tmod.2[t0c/t] t0gate/pp0 t0count/pp1 tmod3.[t0gate] 1 1 _ > - :6 0 & ie.3[et1] ie.7[ea] & ie.1[et0] ie.7[ea] tl0 (8 bits) th0 (8 bits)
pma51xx functional description data sheet 132 revision 2.1, 2010-06-02 timer control register timer 0/1 tcon offset wakeup value reset value timer control register timer 0/1 88 h 00 h 00 h field bits type description tf1 7 rw timer 1 overflow flag this flag is set on timer overflow and automatically cleared by hardware if the interrupt service routine is entere d. in polling mode this bit has to be cleared by software. tr1 6 rw timer 1 run control bit 0 b stop timer 1 / timer 1 does not run 1 b start timer 1 / timer 1 runs tf0 5 rw timer 0 overflow flag this flag is set on timer overflow and automatically cleared by hardware if the interrupt service routine is entere d. in polling mode this bit has to be cleared by software. tr0 4 rw timer 0 run control bit 0 b stop timer 0 / timer 0 does not run 1 b start timer 0 / timer 0 runs ie1 3 rw interrupt 1 request flag this is the interrupt request flag for external interrupt 1 (pp7) 0 b interrupt 1 has not been triggered 1 b interrupt 1 has been triggered it1 2 rw interrupt 1 type control bit 0 b interrupt 1 is trigger ed by a low level on pp7 1 b interrupt 1 is trigger ed by a falling edge on pp7 ie0 1 rw interrupt 0 request flag this is the interrupt request flag for external interrupt 0 (pp9) 0 b interrupt 0 has not been triggered 1 b interrupt 0 has been triggered it0 0 rw interrupt 0 type control bit 0 b interrupt 0 is trigger ed by a low level on pp9 1 b interrupt 0 is trigger ed by a falling edge on pp9 7 0 7 7 rw tf1 6 6 rw tr1 5 5 rw tf0 4 4 rw tr0 3 3 rw ie1 2 2 rw it1 1 1 rw ie0 0 0 rw it0
pma51xx functional description data sheet 133 revision 2.1, 2010-06-02 timer 0 register high byte timer 1 register high byte th0 offset wakeup value reset value timer 0 register high byte 8c h 00 h 00 h field bits type description th0 7:0 rw timer 0 register high byte th1 offset wakeup value reset value timer 1 register high byte 8d h 00 h 00 h field bits type description th1 7:0 rw timer 1 register high byte 7 0 7 0 rw th0 7 0 7 0 rw th1
pma51xx functional description data sheet 134 revision 2.1, 2010-06-02 timer 0 register low byte timer 1 register low byte tl0 offset wakeup value reset value timer 0 register low byte 8a h 00 h 00 h field bits type description tl0 7:0 rw timer 0 register low byte tl1 offset wakeup value reset value timer 1 register low byte 8b h 00 h 00 h field bits type description tl1 7:0 rw timer 1 register low byte 7 0 7 0 rw tl0 7 0 7 0 rw tl1
pma51xx functional description data sheet 135 revision 2.1, 2010-06-02 timer mode register timer 0/1 tmod offset wakeup value reset value timer mode register timer 0/1 89 h 00 h 00 h field bits type description t1gate 7 rw timer 1 gate control bit 0 b internal enable: use tr1 to enable the timer/counter 1 b external enable: use pp8 and tr1 to enable the timer/counter t1c/t 6 rw timer 1 counter / timer select 0 b timer 1 b counter: count input is pp9 t1m 5:4 rw timer 1 mode select 00 b mode 0: 8 bit timer with a divided-by-32 prescaler 01 b mode 1: 16 bit timer 10 b mode 2: 8 bit timer with 8 bit auto-reload 11 b mode 3: timer 1 hold its count. the effect is the same like setting tr1=0 t0gate 3 rw timer 0 gate control bit 0 b internal enable: use tr0 to enable the timer/counter 1 b external enable: use pp0 and tr0 to enable the timer/counter t0c/t 2 rw timer 0 counter / timer select 0 b timer 1 b counter: count input is pp1 t0m 1:0 rw timer 0 mode select 00 b mode 0: 8 bit timer with a divided-by-32 prescaler 01 b mode 1: 16 bit timer 10 b mode 2: 8 bit timer with 8 bit auto-reload 11 b mode 3: two 8 bit timers 7 0 7 7 rw t1gate 6 6 rw t1c/t 54 rw t1m 3 3 rw t0gate 2 2 rw t0c/t 10 rw t0m
pma51xx functional description data sheet 136 revision 2.1, 2010-06-02 2.14.2 timer 2 and timer 3 timer 2 and timer 3 operate as down-counters. the clock source and the timer mode can be selected using sfr tmod2. 2.14.2.1 basic timer operations setting the sfr bit tcon2.0[t2run] (respectively sfr bit tcon2.4[t3run]) starts timer 2 (resp. timer 3). it counts using the selected clock (see sfr tmod2) unt il the timer is elapsed. sfr bit tcon2.1[t2full] (resp. sfr bit tcon2.5[t3full] is set. if the selected timer mode used timer reload, then the ti mer is automatically reloaded and restarted on underrun. if the selected timer mode didn?t use timer reload, th e timer is stopped on underrun and sfr bit tcon2.0[t2run] (resp. sfr bit tcon2.4[t3run]) is cleared. 2.14.2.2 timer modes depending on the setting of the 3 bits of sfr bit tmod 2.2 0[tm2-0], there are 8 timer modes selectable with timer 2 and timer 3. 2.14.2.2.1 timer 2/3 - mode 0 comprises: ? 16-bit timer with reload the timer unit is configured as a 16-bit reloadable timer. sfr tl2 and sfr th2 hold the start value. if sfr bit tcon2.0[t2run] is set, the time r starts counting down. sfr bit tcon2.1[t2full] is set when the timer is elapsed (underflow from 00 h to ff h ). the timer value is reloaded from sfr tl3 and sfr th3, and the timer is restarted automatically. sfr bit tcon2.1[ t2full] has to be reset by software. it is not cleared on read access. note: in this mode, both sfr bit tcon2.4[t3run] and sfr bit tcon2.5[t3full] are not used. figure 49 timer 2/3 - mode 0 t2run t3run timer 2 timer 2 reload tl2 t2full t3full reload th2 tl3 th3 interrupt timer 2 & t2mask ie.6[eid] ie.7[ea]
pma51xx functional description data sheet 137 revision 2.1, 2010-06-02 2.14.2.2.2 timer 2/3 - mode 1 comprises: ? 16-bit timer without reload ? 8-bit timer with reload and bit rate strobe signal for rf transmitter timer 2 operates as a 16-bit timer with star t value in sfr tl2 and sfr th2, timer run bit sfr bit tcon2.0[t2run] and timer elapsed indicator sfr bit tcon2.1[t2full]. if the time r elapses, it stops, sets sfr bit tcon2.1[t2full], and resets the timer run bit sfr bit tcon2.0[t2run]. timer 3 sets up a reloadable 8-bit timer holding the startup value in sfr tl3, timer reload value in sfr th3, timer run bit in sfr bit tcon2.4[t3run], and timer elapsed indicator in sfr bit tcon2.5[t3full]. figure 50 timer 2/3 - mode 1 t3mask ie .6[eid] ie .7[ea] t2run t3run timer 2 timer 3 tl2 t3full th2 tl3 th3 timer 3 reload reload ba u d ra te st ro b e interrupt timer 2 & t2mask ie. 6[eid] t2full interrupt timer 3 & ie.7 [ea ]
pma51xx functional description data sheet 138 revision 2.1, 2010-06-02 2.14.2.2.3 timer 2/3 - mode 2 comprises: ? 8-bit timer with reload ? 8-bit timer with reload and bit rate strobe signal for rf transmitter timer 2 sets up a reloadable 8-bit timer holding the st art value sfr tl2, timer relo ad value sfr th2, timer run bit sfr bit tcon2.0[t2run], and timer el apsed indicator sfr bit tcon2.1[t2full]. timer 3 sets up a reloadable 8-bit timer holding the st art value sfr tl3, timer relo ad value sfr th3, timer run bit sfr bit tcon2.4[t3run], and timer el apsed indicator sfr bit tcon2.5[t3full]. figure 51 timer 2/3 - mode 2 2.14.2.2.4 timer 2/3 - mode 3 comprises: ? 8-bit timer without reload (1) ? 8-bit timer without reload (2) ? 8-bit timer with reload and bit rate strobe signal for rf transmitter timer 2 (1) utilizes sfr tl2 as star ting value and t2full as timer elapse d flag. setting sfr bit tcon2.0[t2run] starts the timer, and sfr bit tcon2.1[t2full] is set when the timer is elapsed. sfr b it tcon2.0[t2run] is reset automatically if the timer elapses. timer 2 (2) utilizes sfr th2 as starting value and sf r bit tcon2.5[t3full] as ti mer elapsed flag. setting sfr bit tcon2.4[t3run] starts the timer, and sfr bit tcon2.5[t3full] is set when the timer is elapsed. sfr bit tcon2.4[t3run] is reset au tomatically if the timer elapses. timer 3 operates exclusively as an 8-bit bit rate timer for manchester coding. therefore the timer needs neither a run nor an elapsed bit. it is started automatically when the timer mode is set. t2run t3run timer 3 tl2 th2 tl3 th3 timer 3 reload reload baudrate strobe timer 2 timer 2 reload reload interrupt timer 2 & t2mask ie .6[eid ] t2full ie .7[ea] t3mask ie. 6[eid] ie.7[ea] t3full interrupt timer 3 &
pma51xx functional description data sheet 139 revision 2.1, 2010-06-02 figure 52 timer 2/3 - mode 3 2.14.2.2.5 timer 2/3 - mode 4 comprises: ? 16-bit timer with reload and bit ra te strobe signal for rf transmitter the timer unit is configured as a 16-bit reloadable time r. sfr tl3 and sfr th3 hold the start value. as soon as sfr bit tcon2.4[t3run] is set, the timer starts countin g. sfr bit tcon2.5[t3full] is set when the timer is elapsed. the timer value is reloaded from sfr tl2 an d sfr th2 and the timer is restarted automatically. sfr bit tcon2.5[t3full] has to be reset by software. it is not cleared on read-access. note: in this mode, both sfr bit tcon2.0[t2run] and sfr bit tcon2.1[t2full] are not used. figure 53 timer 2/3 - mode 4 t2run t3run timer 3 tl2 th2 tl3 th3 timer 3 reload reload baudrate strobe timer 2 (1) timer 2 (2) t3mask ie.6[eid ] ie .7 [ea] t3full interrupt timer 3 & interrupt timer 2 & t2mask ie. 6[eid] t2full ie.7 [ea ] t2run t3run timer 3 reload timer 3 tl2 t2full reload th2 tl3 th3 t3mask ie.6[eid] ie.7[ea] t3full interrupt timer 3 &
pma51xx functional description data sheet 140 revision 2.1, 2010-06-02 2.14.2.2.6 timer 2/3 - mode 5 comprises: ? 8-bit timer with reload ? 16-bit timer without reload and bit rate strobe signal for rf transmitter timer 2 sets up a reloadable 8-bit timer holding the star t value in sfr tl2, timer reload value in sfr th2, timer run bit sfr bit tcon2.0[t2run], and timer el apsed indicator in sfr bit tcon2.1[t2full]. timer 3 operates as a 16-bit timer with the st art value in sfr tl3 and sfr th3, timer run bit sfr bit tcon2.4[t3run], and timer elap sed indicator sfr bit tcon2.5[t3full]. if the timer elapses, the timer stops sfr bit tcon2.5[t3fu ll] is set, and the timer run bi t sfr bit tcon2.4[t3run] is reset. figure 54 timer 2/3 - mode 5 2.14.2.2.7 timer 2/3 - mode 6 comprises: ? 16-bit timer without reload ? 16-bit timer without reload and bit rate strobe signal for rf transmitter timer 2 operates as a 16-bit timer with the st art value in sfr tl2 and sfr th2, timer run bit sfr bit tcon2.0[t2run], and timer elapsed indicator sfr b it tcon2.1[t2full]. if the timer is elapsed the timer is stopped, sfr bit tcon2.1[t2full] is set, and t he timer run bit sfr bit tcon2.0[t2run] is reset. timer 3 operates as a 16-bit timer with the st art value in sfr tl3 and sfr th3, timer run bit sfr bit tcon2.4[t3run], and timer elap sed indicator sfr bit tcon2.5[t3full]. if the timer elapses, the timer stops, sfr bit tcon2.5[t3full] is set, and the timer run bit sfr bit tcon2.4[t3run] is reset. t2run t3run timer 2 timer 3 tl2 th2 tl3 th3 reload timer 2 reload t3mask ie.6[eid ] ie .7[ea] t3full interrupt timer 3 & interrupt timer 2 & t2mask ie .6[eid ] t2full ie .7[ea]
pma51xx functional description data sheet 141 revision 2.1, 2010-06-02 figure 55 timer 2/3 - mode 6 2.14.2.2.8 timer 2/3 - mode 7 comprises: ? 16-bit timer for interval timer calibration ? 8-bit timer with reload and bit rate strobe signal for rf transmitter timer 2 operates as a 16-bit clock counter during one 2 khz rc lp oscillator period with the counting value provided in sfr tl2 and sfr th2, a timer run bit sf r bit tcon2.0[t2run], and timer overflow indicator sfr bit tcon2.1[t2full]. when sfr bit tcon 2.0[t2run] is set, the counter starts counting on the next rising edge of the 2 khz rc lp oscillato r, and is stopped at the subsequent rising edge. this timer mode is used for interval timer calibration by the library functions, for example (see [1] ). timer 3 sets up a reloadable 8-bit timer holding the startup value in sfr tl3, timer reload value in sfr th3, timer run bit in sfr bit tcon2.4[t3run], and timer elapsed indicator in sfr bit tcon2.5[t3full]. note: this timer mode is not recommended for application us age. it is used by the library functions for calibration. figure 56 timer 2/3 - mode 7 t2run t3run timer 2 reload timer 3 tl2 th2 tl3 th3 interrupt timer 2 & t2mask ie .6 [eid ] t2full ie .7[ea] ie.6[eid] ie .7[ea] t3full interrupt timer 3 & t3 m ask t2run t3run timer 3 timer 2 tl2 th2 tl3 th3 reload timer 3 reload rc-lp period baudrate strobe interrupt timer 2 & t2mask ie .6[eid ] t2full ie .7[ea] ie .6[eid ] ie .7[ea] t3full interrupt timer 3 & t3mask
pma51xx functional description data sheet 142 revision 2.1, 2010-06-02 2.14.2.3 register description table 22 registers overview register short name register long name offset address wakeup value page number tcon2 timer control register timer 2/3 c8 h 00 h 143 tmod2 timer mode register 2 timer 2/3 c9 h 00 h 146 tl3 timer 3 register low byte ca h 00 h 145 th3 timer 3 register high byte cb h 00 h 144 tl2 timer 2 register low byte cc h 00 h 145 th2 timer 2 register high byte cd h 00 h 144
pma51xx functional description data sheet 143 revision 2.1, 2010-06-02 timer control register timer 2/3 tcon2 offset wakeup value reset value timer control register timer 2/3 c8 h 00 h 00 h field bits type description t3mask 7 rw timer 3 interrupt mask 0 b timer 3 interrupt is not blocked 1 b timer 3 interrupt is blocked (masked) res 6 reserved t3full 5 rw timer 3 full bit 0 b no timer 3 underrun occurred 1 b timer 3 underrun occurred t3run 4 rw timer 3 run bit 0 b stop timer 3 / timer 3 does not run 1 b start timer 3 / timer 3 runs t2mask 3 rw timer 2 interrupt mask 0 b timer 2 interrupt is not blocked 1 b timer 2 interrupt is blocked (masked) res 2 reserved t2full 1 rw timer 2 full bit 0 b no timer 2 underrun occurred 1 b timer 2 underrun occurred t2run 0 rw timer 2 run bit 0 b stop timer 2 / timer 2 does not run 1 b start timer 2 / timer 2 runs 7 0 7 7 rw t3mask 6 6 res 5 5 rw t3full 4 4 rw t3run 3 3 rw t2mask 2 2 res 1 1 rw t2full 0 0 rw t2run
pma51xx functional description data sheet 144 revision 2.1, 2010-06-02 timer 2 register high byte timer 3 register high byte th2 offset wakeup value reset value timer 2 register high byte cd h 00 h 00 h field bits type description th2 7:0 rw timer 2 register high byte th3 offset wakeup value reset value timer 3 register high byte cb h 00 h 00 h field bits type description th3 7:0 rw timer 3 register high byte 7 0 7 0 rw th2 7 0 7 0 rw th3
pma51xx functional description data sheet 145 revision 2.1, 2010-06-02 timer 2 register low byte timer 3 register low byte tl2 offset wakeup value reset value timer 2 register low byte cc h 00 h 00 h field bits type description tl2 7:0 rw timer 2 register low byte tl3 offset wakeup value reset value timer 3 register low byte ca h 00 h 00 h field bits type description tl3 7:0 rw timer 3 register low byte 7 0 7 0 rw tl2 7 0 7 0 rw tl3
pma51xx functional description data sheet 146 revision 2.1, 2010-06-02 timer mode register 2 timer 2/3 tmod2 offset wakeup value reset value timer mode register 2 timer 2/3 c9 h 00 h 00 h field bits type description t3clk 7:6 rw timer 3 clock source select (see figure 9 ?pma5110 clock concept? on page 52 ) 00 b undivided system clock 01 b system clock divided by 6 10 b 2 khz lp rc oscillator clock 11 b pp2 event count (rising edge) t2clk 5:4 rw timer 2 clock source select (see figure 9 ?pma5110 clock concept? on page 52 ) 00 b undivided system clock 01 b system clock divided by 6 10 b 2 khz lp rc oscillator clock 11 b timer 3 overflow event count res 3 reserved tm 2:0 rw timer mode 000 b mode 0 001 b mode 1 010 b mode 2 011 b mode 3 100 b mode 4 101 b mode 5 110 b mode 6 111 b mode 7 7 0 76 rw t3clk 54 rw t2clk 3 3 res 20 rw tm
pma51xx functional description data sheet 147 revision 2.1, 2010-06-02 2.15 general purpose input/output (gpio) ten gpio pins are available and can ei ther be used by the application for general purposes, or are assigned to a peripheral ( alternative port functionality ). when used as gpio pins, they can be accessed directly by the processor. pull-up and pull-down resistors are configurable on demand to allow wired-and and wired-or functions. all peripheral port pins are configured as input with the pull-up resistor, which is enabled after a power on reset. pin status will be kept during power down state. 2.15.1 gpio port configuration the following table shows the different poss ible configurations for the gpio port. note: in addition, sfr bit ppsx defines the wake-up sensitivity for th e external wake -up source (see external wake-up on pp1-pp4 and pp6-pp9 ). the x in the table above has to be replaced by 0 to 9 (pp0 - pp9). 2.15.2 spike suppression on input pins to avoid metastability when reading the gpio pins, a synchronization stage is included and a two-stage spike filter suppresses spikes; thus data is available to be read after a delay no greater than 2 system clock periods. due to the synchronization stage, the following might occur: ? signal duration (t signal ) < 1 system clock period (1 t clk ): signal is suppressed ?1t clk < t signal < 2 t clk : undefined if suppressed or passed ?t signal > 2 t clk : signal is available in p1in or p3in register 2.15.3 external wake-up on pp1-pp4 and pp6-pp9 pp1-pp4 and pp6-pp9 can additionally be used as external wake-up sources. to enable the external wake-ups the appropriate bit in the sfr extwum must be set to 0 b and the pin must be configured as input by setting the appropriate bits in p1dir respectively p3dir to 1 b . the internal pull-up/pull-down resistor is enabled if the appropriate bits in sfr p1out respectively in sfr p3out are set. sfr p1sens respectively sfr p 3sens selects the sensitivity (activ e high/active low). for the settings where the internal pull-up resistor is enabled, a low on the appropriate ppx causes a wake-up. when the pull- down resistor is enabled with the appropriate setting a hi gh on ppx causes a wake-up. a logical description of the external wake-ups and the internal pull-up/pull-down resi stors is show in figure 57 ?logical description of external wake-ups and internal pull-up/pull-down resistors? on page 148 . table 23 gpio port configuration ppdx ppox ppsx i/o pull-up/ pull-down comment 0 0 - output no low (sink) 0 1 - output no high (source) 1 0 - input no high-z (tri -state bidirectional) 1 1 0 input pull-up weak-high (quasi bidirectional) 1 1 1 input pull-down weak-low (quasi bidirectional)
pma51xx functional description data sheet 148 revision 2.1, 2010-06-02 figure 57 logical description of external wake- ups and internal pull-up/pull-down resistors 2.15.4 alternative port functionality in the following table, the alternative port functionality is shown - which has higher priority than standard i/o port functionality. table 24 i/o port 1 - alternative functionality pin function i/o description pp0 i2c-scl i i2c serial clock line configured to i2c clock pin if sfr bit cfg1.6 [i2cen] is set. weak-high has to be provided either by the internal pull-up resistor, by an external pull-up resistor or by the i2c master device. port pin i/o i/o standard i/o po rt functionality controlled by p1dir.0, p1out.0, p1in.0. t0gate i/o can be used (alternative to the tmod.3 [t0gate]) as enable function for timer 0 opmode1 i/o select operation mode (normal-, debug-, programming mode) pp1 i2c-sda i/o i2c serial data configured to i2c data pin if bit cfg1.6 [i2cen] is set. weak-high has to be provided either by the internal pull-up resistor, by an external pull-up resistor, or by the i2c master device. port pin i/o i/o standard i/o port functionality controlled by p1di r.1, p1out.1, p1in.1, p1sens.1. wu0 i/o wake-up by external wake-up source. wake-up functionality in power down state when enabled by setting extwum.0 to zero . wake-up level sensitivity dependent on p1sens.1 (if set to 0, sensitive on low-level). t0count i/o can be used (alternative to cpu clock, tmod.2[t0c/t]) as source for timer 0 in counter mode. opmode2 i/o select operation mode (normal-, debug-, programming mode) pp2 txdataout i/o rf encoder data output: if bit cfg1.4[rftxpen] is set to one, the manchester/biphase encoded data is delivered serially to pp2. port pin i/o i/o standard i/o port functionality controlled by p1di r.2, p1out.2, p1in.2, p1sens.2. wu1 i/o wake-up by external wake up source. wake-up functionality in power down state when enabled by setting extwum.1 to zero . wake-up level sensitivity dependent on p1sens.2 (if set to 0, sensitive on low-level). t3count i/o can be used as clock source for time r 3 when selected via tmod2.7 - 6 [t3clk.x]. ppx extwum wu 0 vbat gnd ppdx ppox pull- up pull- down ppsx 1 & & & & >=1 >=1 & & & &
pma51xx functional description data sheet 149 revision 2.1, 2010-06-02 pp3 spi_cs i/o spi bus interface chip select port pin i/o i/o standard i/o port functionality controlled by p1di r.3, p1out.3, p1in.3, p1sens.3 wu2 i/o wake-up by external wake-up source. wake-up functionality in power down state when enabled by setting extwum.2 to zero . wake-up level sensitivity dependent on p1sens.3 (if set to 0, sensitive on low-level). pp4 spi_miso i/o spi bus interface master in slave out port pin i/o i/o standard i/o port functionality controlled by p1di r.4, p1out.4, p1in.4, p1sens.4 wu3 i/o wake-up by external wake-up source. wake-up functionality in power down state when enabled by setting extwum.3 to zero . wake-up level sensitivity dependent on p1sens.4 (if set to 0 se nsitive on low-level). pp5 spi_mosi i/o spi bus interface master out slave in port pin i/o i/o standard i/o port functionality controlled by p1di r.5, p1out.5, p1in.5, p1sens.5 pp6 spi_clk i/o spi bus interface clock port pin i/o i/o standard i/o port functionality controlled by p1di r.6, p1out.6, p1in.6, p1sens.6 wu4 i/o wake-up by external wake-up source. wake-up functionality in power down state when enabled by setting extwum.4 to zero . wake-up level sensitivity dependent on p1sens.6 (if set to 0, sensitive on low-level). pp7 port pin i/o i/o standard i/o po rt functionality controlled by p1 dir.7, p1out.7, p1in.7, p1sens.7 extint1 i/o when enabled by setting ie.2 [ex1], this pin can generate an interrupt event that is sensitive to pin level or fa lling edge. the separa tion by level or edge is done via tcon.2 [it1]. the interrupt flag is tcon3.[ie1]. wu5 i/o wake-up by external wake-up source. wake-up functionality in power down state when enabled by setting extwum.5 to zero . wake-up level sensitivity dependent on p1sens.7 (if set to 0, sensitive on low-level). pp8 port pin i/o i/o standard i/o po rt functionality controlled by p3 dir.0, p3out.0, p3in.0, p3sens.0 wu6 i/o wake-up by external wake-up source. wake-up functionality in power down state when enabled by setting extwum.6 to zero . wake-up level sensitivity dependent on p3sens.0 (if set to 0, sensitive on low-level). t1gate i/o can be used (alternative to the tmod.7 [t1gate]) as enable function for timer 1 pp9 port pin i/o i/o standard i/o po rt functionality controlled by p3 dir.1, p3out.1, p3in.1, p3sens.1 ext_int0 i/o when enabled by setting ie.0 [ex0] this pin can generate an interrupt event sensitive on pin level or falling edge. the separation by level or edge is done via tcon.0 [it0]. the interrupt flag is tcon1.[ie0]. wu7 i/o wake-up by external wake up source. wake-up functionality in power down state when enabled by setting extwum.7 to zero . wake-up level sensitivity dependent on p3sens.1 (if set to 0, sensitive on low-level). t1count i/o can be used (alternative to cpu clock, tmod.6[t1c/t]) as source for timer 1 in counter mode. table 24 i/o port 1 - alternative functionality (cont?d) pin function i/o description
pma51xx functional description data sheet 150 revision 2.1, 2010-06-02 2.15.5 register description io-port 1 direction register table 25 registers overview register short name register long name offset address wakeup value page number p1out io-port 1 data out register 90 h uuuuuuuu b 153 p1dir io-port 1 direction register 91 h uuuuuuuu b 150 p1in io-port 1 data in register 92 h xxxxxxxx b 152 p1sens io-port 1 sensitivity register 93 h uuuuuuuu b 154 p3out io-port 3 data out register b0 h 000000uu b 153 p3dir io-port 3 direction register eb h 000000uu b 151 p3in io-port 3 data in register ec h 000000xx b 152 p3sens io-port 3 sensitivity register ed h 000000uu b 155 p1dir offset wakeup value reset value io-port 1 direction register 91 h uuuuuuuu b ff h field bits type description pd1_7 7 rw pp7 direction 0 b output 1 b input pd1_6 6 rw pp6 direction 0 b output 1 b input pd1_5 5 rw pp5 direction 0 b output 1 b input pd1_4 4 rw pp4 direction 0 b output 1 b input pd1_3 3 rw pp3 direction 0 b output 1 b input 7 0 7 7 rw pd1_7 6 6 rw pd1_6 5 5 rw pd1_5 4 4 rw pd1_4 3 3 rw pd1_3 2 2 rw pd1_2 1 1 rw pd1_1 0 0 rw pd1_0
pma51xx functional description data sheet 151 revision 2.1, 2010-06-02 io-port 3 direction register pd1_2 2 rw pp2 direction 0 b output 1 b input pd1_1 1 rw pp1 direction 0 b output 1 b input pd1_0 0 rw pp0 direction 0 b output 1 b input p3dir offset wakeup value reset value io-port 3 direction register eb h 000000uu b 03 h field bits type description res 7:2 reserved pp9d 1 rw pp9 direction 0 b output 1 b input pp8d 0 rw pp8 direction 0 b output 1 b input field bits type description 7 0 72 res 1 1 rw pp9d 0 0 rw pp8d
pma51xx functional description data sheet 152 revision 2.1, 2010-06-02 io-port 1 data in register io-port 3 data in register p1in offset wakeup value reset value io-port 1 data in register 92 h xxxxxxxx b xxxxxxxx b field bits type description pi1_7 7 r pp7 data in pi1_6 6 r pp6 data in pi1_5 5 r pp5 data in pi1_4 4 r pp4 data in pi1_3 3 r pp3 data in pi1_2 2 r pp2 data in pi1_1 1 r pp1 data in pi1_0 0 r pp0 data in p3in offset wakeup value reset value io-port 3 data in register ec h 000000xx b 000000xx b field bits type description res 7:2 reserved pi3_1 1 r pp9 data in pi3_0 0 r pp8 data in 7 0 7 7 r pi1_7 6 6 r pi1_6 5 5 r pi1_5 4 4 r pi1_4 3 3 r pi1_3 2 2 r pi1_2 1 1 r pi1_1 0 0 r pi1_0 7 0 72 res 1 1 r pi3_1 0 0 r pi3_0
pma51xx functional description data sheet 153 revision 2.1, 2010-06-02 io-port 1 data out register io-port 3 data out register p1out offset wakeup value reset value io-port 1 data out register 90 h uuuuuuuu b ff h field bits type description p1_7 7 rw pp7 data out p1_6 6 rw pp6 data out p1_5 5 rw pp5 data out p1_4 4 rw pp4 data out p1_3 3 rw pp3 data out p1_2 2 rw pp2 data out p1_1 1 rw pp1 data out p1_0 0 rw pp0 data out p3out offset wakeup value reset value io-port 3 data out register b0 h 000000uu b 03 h field bits type description res 7:2 reserved p3_1 1 rw pp9 data out p3_0 0 rw pp8 data out 7 0 7 7 rw p1_7 6 6 rw p1_6 5 5 rw p1_5 4 4 rw p1_4 3 3 rw p1_3 2 2 rw p1_2 1 1 rw p1_1 0 0 rw p1_0 7 0 72 res 1 1 rw p3_1 0 0 rw p3_0
pma51xx functional description data sheet 154 revision 2.1, 2010-06-02 io-port 1 sensitivity register this register is used select the pull-up / pull-down functio nality of the gpios. for proper usage of the pull-up / pull- down functionality check the settings of registers p1dir and p1out and see table 23 ?gpio port configuration? on page 147 . p1sens offset wakeup value reset value io-port 1 sensitivity register 93 h uuuuuuuu b 00 h field bits type description ps1_7 7 rw pp7 sensitivity 0 b pull-up 1 b pull-down ps1_6 6 rw pp6 sensitivity 0 b pull-up 1 b pull-down ps1_5 5 rw pp5 sensitivity 0 b pull-up 1 b pull-down ps1_4 4 rw pp4 sensitivity 0 b pull-up 1 b pull-down ps1_3 3 rw pp3 sensitivity 0 b pull-up 1 b pull-down ps1_2 2 rw pp2 sensitivity 0 b pull-up 1 b pull-down ps1_1 1 rw pp1 sensitivity 0 b pull-up 1 b pull-down ps1_0 0 rw pp0 sensitivity 0 b pull-up 1 b pull-down 7 0 7 7 rw ps1_7 6 6 rw ps1_6 5 5 rw ps1_5 4 4 rw ps1_4 3 3 rw ps1_3 2 2 rw ps1_2 1 1 rw ps1_1 0 0 rw ps1_0
pma51xx functional description data sheet 155 revision 2.1, 2010-06-02 io-port 3 sensitivity register this register is used select the pull-up / pull-down functio nality of the gpios. for proper usage of the pull-up / pull- down functionality check the settings of registers p3dir and p3out and see table 23 ?gpio port configuration? on page 147 . p3sens offset wakeup value reset value io-port 3 sensitivity register ed h 000000uu b 00 h field bits type description res 7:2 r for future use ps3_1 1 rw pp9 sensitivity 0 b pull-up 1 b pull-down ps3_0 0 rw pp8 sensitivity 0 b pull-up 1 b pull-down 7 0 72 r res 1 1 rw ps3_1 0 0 rw ps3_0
pma51xx functional description data sheet 156 revision 2.1, 2010-06-02 2.16 i 2 c interface for communication between external hardware (like eeprom s, remote i/o ports, lcd drivers, rams...) and the pma51xx, an i 2 c master/slave interface is implemented. this interface is co mpatible to the i 2 c specification. ? pp1 is used as a serial data line (sda) ? pp0 is used as a serial clock line (scl) ? in idle mode the i 2 c lines are weak high ? pma51xx responds to the i 2 c- address defined in sfr i2cm (reset value is 6c h ) or to a general call if enabled by addressing slave address 00 h . general call is enabled by setting sfr bit i2cc.6[gcen]. ? the following data transfer rates according to i 2 c specification can be achieved ? slave mode: normal mode (up to 100kbit /s) and fast mode (up to 400 kbit/s) ? master mode: normal mode (up to 100 kbit/s) note: the i 2 c interface is used in debug mode, therefore it must not be reconfigured in debug mode. furthermore debugging of the i 2 c interface itself is not possible and will lead to debugging errors. 2.16.1 module structure figure 58 points out the internal structure of the i 2 c-module. all activities are controlled by the control logic internal control finite state machine (fsm). control over the i 2 c bus pins is implemented in block pin control, responsible for start and stop bit detection and pin timing. besides the control fsm the block control logic in add ition comprises the communic ations timing (timing & delay) using the baud rate counter, the bit counter for co unting incoming data bits and the arbitration logic for multi master operation. the control logic internal fsm is contro lled by the control register i2cc. conf iguration informatio n is given by the mode register i2cm (device address) and the baud rate register i2cb (determining the working speed of the i 2 c- bus). to provide information about appearing events and st atus information the status register i2cs is used. the virtual register i2cd is used to store incoming an d outgoing data bytes. outgoing data bytes are moved from the internal register tx-bu ffer to the shift register, in coming data bits are collected in the shift register and moved to rx-buffer if a full byte has been received. if an a ddress is received, this byte is compared to the device address in mode register i2cm. figure 58 i 2 c module structure res gcen inp ac kdt acken pen rsen sen am cd ov s rn w rack tbf rbf a2 a1 a0 a7 a6 a5 a4 a3 b2 b1 b0 b7 b6 b5 b4 b3 tx buffer (d7:0) rx buffer ( d7:0) shift register baudrate counter ad d re ss compare control logic arbitration bit counter timing & delay control fsm pin control sta rt sto p i2 c c i2 c s i2 c b i2 cm i2 c d level rising falling out_en scl level rising falling out_en sda i2c module
pma51xx functional description data sheet 157 revision 2.1, 2010-06-02 2.16.2 i 2 c programming instructions to enable the i 2 c-bus interface sfr bit cfg1.6 [i2cen] has to be set. further settings has to be done to prepare the i 2 c-module for master or slave operation. ? configure the device by setting register i2cc. general calls can be enabled by setting bit i2cc.6[gcen], the service request mechanism (polling/interrupt mo de) has to be decided via bit i2cc.5[inp]. ? enter the device address in mode register i2cm. if no changes are done the i 2 c-bus matches to the predefined address 6c h . ? the baud rate register i2cb has to be set according to the used mode and to the demands of transmission speed. in master mode the register has to be set to a maximum transfer rate proportional value. according to the settings and according to the sequence handling mode (polling or interrupt mode) differing programming instructions have to be executed. 2.16.2.1 slave mode sequence (polling mode) once the i 2 c-bus module has been enabled an d configured to pollin g mode by setting bi t i2cc.5[inp] to 0 b , the i 2 c interface waits for a start condition to occur. subsequent ly the following 8 bits (7 bits address, 1 bit rnw) are shifted into an internal shift register and compared to the internal device address. when the address matches the hardware automatically generates an acknowledge and bi t i2cs.7[am] is set. together with the address the direction bit rnw is transferred. according to its value (s tored in bit i2cs.3[rnw]) diff erent actions has to be set: receive i 2 c-data ? if bit i2cs.0[rbf] is set a data byte has been shifted in and transferred to the internal rx-data register. the received byte is ready to be read out. an acknowledge is automatically set by hardware as long as no receive buffer overflow (bit i2cs.5[ov] in status register) has occurred. ? if bit i2cs.4[s] is set a stop condition has occurred and the transmission is closed. ? if bit i2cs.7[am] is set a rest art condition has been set on i 2 c-bus and a matching address has been transmitted. in case of a write access a branch to the transmit data subroutine has to be performed. transmit i 2 c-data ? in the transmit data subroutine the data to be transmitte d first has to be written to register i2cd. i2cs.1[tbf] is set until the byte is transferred to the shift register and transmission is starte d physically - i2cs.1[tbf] is cleared again and new data can be written to i2cd. if no data byte is provided, the i 2 c clock line scl is held low by the slave (the bus is blocked). ? if bit i2cs.4[s] is set, the tran smission process has been terminated by the master and the transmission subroutine may be left. 2.16.2.2 slave mode seque nce (interrupt mode) interrupt handling is enabled by setting bit i2cc.5[inp] to 1 b . with every interrupt event the software routine restarts at the entry point of the i 2 c interrupt service routine, so the actual state and the cause for this interrupt has to be identified before cont inuing with the next step. co mpared to the pollin g mode differing stat us information are needed for this non sequential handling and should be handled the following way: ? if i2cs.4[s] is set to 1 b the transfer is still active, ot herwise it has been terminated. ? if i2cs.7[am] is set, the i 2 c interface has been addressed as slave devi ce (slave interrupt), otherwise a master interrupt request is pending. ? if i2cs.6[cd] is set an unexpected start or stop condition has been detected if the device has been addressed as slave device - or if acting as master device a collision has been detected on i 2 c bus (arbitration). ? if i2cs.3[rnw] is set, a read sequence is executed and the i 2 c slave device has to provide data by writing to register i2cd, otherwise a write sequence is ex ecuted and data are provided within register i2cd.
pma51xx functional description data sheet 158 revision 2.1, 2010-06-02 ? if a write sequence is executed and i2cs.0[rbf] is set, then the received data can be read from i2cd - otherwise the address byte can be read from i2cd to decide whether to handle a general call (if enabled with i2cc.6[gcen]) or a slave transfer. i 2 c slave interrupts are generated on following events: ? if a general call has been received ? if data are received and ready to be read out from i2cd. ? if data have to be transmitted and are required in i2cd. ? if the transfer has been stopped by a stop condit ion or by an unexpected start or stop condition. 2.16.2.3 general call sequence if a general call address is sent and bit i2cm.6[gcen] is set the i 2 c bus behaves like a slave receiver, i.e. a slave mode sequence procedures may be taken. the general call protocol handling has to be done by software. 2.16.2.4 master mode se quence (polling mode) after enabling the i 2 c-bus module the i 2 c device behaves like a slave. if i 2 c bus is free of communication a master transfer can be initiated by writing an address byte (inc luding the access direction bi t rnw) to i2cd and setting a start condition with bit i2cc.0[sen]. th e start condition and the following addr ess byte is transmitted immediately on scl and sda. an existing i 2 c device with fitting device address will th en respond with an acknowledge. if the polling mode was enabled by setting bit i2cc.5[inp] to 0 b bit i2cs.3[rack] will then be set accordingly. consecutively the master may transmit (write data to i2cd) or receive data (read data from i2cd after reception) according to the transmitted rnw bit. receive i 2 c-data after data reception (i2cs.0[ rbf] is set) the master has to set an acknowledge. this is done by setting bit i2cc.4[acken] and bit i2cc.5[ackdt]. transmit i 2 c-data after writing data to r egister i2cd they are transmitted. if finished the master will be info rmed with i2cs.3[rack] if the data have been acknowledged. if no more data are needed to be transmitted/received th e master can stop the transfer by setting a stop condition with bit i2cc.3[pen] - or continue with a new transfer by se tting a restart condition wit h bit i2cc.2[rsen]. if a stop condition is issued bit i2cs.4[s] is set again. in multi master mode also pay attention to collision detection indicated by bit i2cs.6[cd]. 2.16.2.5 master mode sequence (interrupt mode) contrary to the master mode sequence in polling mode the i 2 c bus handling in interrupt mode has to be included in the slave mode interrupt sequence due to the non seq uential interrupt handling. nevertheless the master mode sequence has to be started by providing address informatio n in i2cd and a start condition enable by setting bit i2cc.0[sen]. handling of the i 2 c transfer is then done in the interrupt service routine doing the following checks: ? if i2cs.4[s] is set to 1 b the transfer is still active, otherwise the stop condition has termin ated the transfer. ? if i2cs.7[am] is set, the i 2 c interface has been addressed as slave devi ce (slave interrupt), otherwise a master interrupt request is pending. ? if i2cs.6[cd] is set a collision has been detected on i 2 c bus (arbitration) and an other master device took over the control. ? if i2cs.3[rnw] is set, a read sequence has been started and the i 2 c master device has to read the received data from register i2cd and provide acknowledge in formation writing i2cc.4[a ckdt] and i2cc.3[acken].
pma51xx functional description data sheet 159 revision 2.1, 2010-06-02 ? if i2cs.3[rnw] is not set, a write sequence has been started. according to the received acknowledge information provided by i2cs.2[rack] data have to be provided by writing register i2cd or transfer has to be terminated generating a stop co ndition with i2cc.2[pen] or a re start condition with i2cc.1[rsen]. i 2 c master interrupts are generated on following events: ? if the i 2 c device has been addressed a slave interrup t is received (master acting as slave). ? if a bus collision has occurred. ? if data (or slave address) has been transmitted. received acknowledge information can be read and further steps can be decided writing to i2cc. new data to transmit can be provided by writing to i2cd. ? if data have been received. acknowledge information sh ould be provided by the master interface and further steps can be decided by writing to i2cc. data can be read from register i2cd.
pma51xx functional description data sheet 160 revision 2.1, 2010-06-02 2.16.3 register description i 2 c baud rate register this register is used to control the i 2 c-bus transmission speed in master mode . in slave mode this register is used to determine the data setup time after scl hold (delay by slave). the value can be calculated by the equation shown in figure 59 . figure 59 calculation of i 2 c baud rate table 26 registers overview register short name register long name offset address wakeup value page number i2cd i2c data register 9a h 00 h 162 i2cs i2c status register 9b h 00 h 163 i2cc i2c control register a2 h 00 h 161 i2cm i2c mode register a3 h 6c h 162 i2cb i2c baud rate register b1 h 00 h 160 i2cb offset wakeup value reset value i2c baud rate register b1 h 00 h 00 h field bits type description i2cb 7:0 rw i2c baud rate register data transfer rate compliant value for scl hold time (master behavior) or data setup time after sc l hold (slave behavior). 1 2 2 ? ? = ) ] hz [ f ( ] s [ scl cb i sys high 7 0 7 0 rw i2cb
pma51xx functional description data sheet 161 revision 2.1, 2010-06-02 i 2 c control register i2cc offset wakeup value reset value i2c control register a2 h 00 h 00 h field bits type description res 7 reserved gcen 6 rw general call enable 0 b general call disabled 1 b general call enabled, if bit cfg1.6[i2cen] is set inp 5 rw mode selection (interrupt / not polling) selection of the i 2 c mode. the behavior of the i 2 c status register (spis) changes accordingly. 0 b polling mode 1 b interrupt mode ackdt 4 rw acknowledge data provides acknowledge informatio n if acknowledge is set by i2cc.3[acken] in master mode. 0 b give a not acknowledge on incoming data 1 b acknowledge incoming data acken 3 rw acknowledge sequence enable sets acknowledge information defined in i2cc.4[ackdt] on i2c bus in master mode. this bit is automatica lly reset by hardware afterwards. 0 b idle 1 b acknowledge data defined in ackdt is sent pen 2 rw stop condition enable initiates a stop condition on the corr ect position in the transmission frame in master mode. this bit is automatically reset by hardware afterwards. 0 b idle 1 b set stop condition rsen 1 rw restart condition enable initiates a restart condition on the correct position in the transmission frame in master mode. if commonly set with stop condition the stop condition is executed. this bit is automatically re set by hardware afterwards. 0 b idle 1 b set restart condition 7 0 7 7 res 6 6 rw gcen 5 5 rw inp 4 4 rw ackdt 3 3 rw acken 2 2 rw pen 1 1 rw rsen 0 0 rw sen
pma51xx functional description data sheet 162 revision 2.1, 2010-06-02 i 2 c data register rx-buffer and tx-buffer are two data transmission register s that are accessible by the virtual register i2cd. if read, the content of the rx-buffer is prov ided, if written the tx-buffer is filled. i 2 c mode register this register is used to set the i 2 c address of the pma51xx. sen 0 rw start condition enable initiates a start condition on the correct position in the transmission frame in master mode. this bit is automatically reset by hardware afterwards. 0 b idle 1 b set start condition i2cd offset wakeup value reset value i2c data register 9a h 00 h 00 h field bits type description i2cd 7:0 rw i2c data register provide access to tx-buffer if written and rx-buffer if read. i2cm offset wakeup value reset value i2c mode register a3 h 6c h 6c h field bits type description a7_1 7:1 rw i2c address bit 7 down to bit_1 res 0 r i2c address bit 0 this bit is fixed to 0 b field bits type description 7 0 7 0 rw i2cd 7 0 7 1 rw a7_1 0 0 r res
pma51xx functional description data sheet 163 revision 2.1, 2010-06-02 i 2 c status register i2cs offset wakeup value reset value i2c status register 9b h 00 h 00 h field bits type description am 7 rc address matched / slave transfer polling mode (i2cc.5[inp] is set to 0 b ): set if received device address ma tches with received address byte (corresponding to 7-bit or 10-bit addressing mode). interrupt mode (i2cc.5[inp] is set to 1 b ): set while pma51xx has been addressed as slave device. this bit is automatically reset by hardware when the transfer is stopped. 0 b idle 1 b address matched (polling) / slave transfer (interrupt) cd 6 rc collision detected if master transfer is executed, this bi t is set if a collisio n was detected. if a slave transfer is executed, this bi t is set if an unexpected start/stop condition occurs during address/data transfer. 0 b idle 1 b collision detected ov 5 rc overflow set if new data have been received and old data in the rx-buffer (i2cd register) were not read. set if data are still pendi ng in the tx-buffer when new data are written into i2cd. 0 b idle 1 b buffer overflow detected s4rc stop bit detected / transfer active polling mode (i2cc.5[inp] is set to 0 b ): set if stop condition has been detected. interrupt mode (i2cc.5[inp] is set to 1 b ): set as long as an ongoing transfer is detected. 0 b idle 1 b stop bit detected (polling) / ongoing transfer (interrupt) rnw 3 r read / not write bit information contains the type of transfer. if master transfer is executed this bit is automatically captured on sending the address. if a slave transfer is executed this bit is captured on receiving the address. 0 b write transfer (slave-receiver / master-transmitter) 1 b read transfer (slave-transmitter / master-receiver) 7 0 7 7 rc am 6 6 rc cd 5 5 rc ov 4 4 rc s 3 3 r rnw 2 2 r rack 1 1 r tbf 0 0 r rbf
pma51xx functional description data sheet 164 revision 2.1, 2010-06-02 rack 2 r received acknowledge level contains the level of the received acknowledge. 0 b received not acknowledge (nack) 1 b received acknowledge (ack) tbf 1 r transmit buffer full set if register i2cd is written. clear ed by hardware if the tx-buffer is moved to the shift register, thus the data byte is transmitted. 0 b transmit buffer empty 1 b transmit buffer full rbf 0 r receive buffer full set if the content from the shift regist er is moved to the rx-buffer, thus data byte is received. cleared by hardware if register i2cd is read. 0 b receive buffer empty 1 b receive buffer full field bits type description
pma51xx functional description data sheet 165 revision 2.1, 2010-06-02 2.17 spi interface the serial peripheral interface (spi) is a very simple syn chronous interface to transfer data on a serial bus, connecting an intelligent mast er controller with general-pur pose slave circuits such as slave controller, rams, memories, and so on. a simple 2-wire (half-duplex mode) or 3-wire (full-duplex mode) bus is used for communication. ? high-speed synchronous data transfer ? four programmable bit rates through prescaler ? 2-wire bus for half-duplex transmission; a serial clock line (spi_clk) and concatenated data line (spi_miso,spi_mosi) ? 3-wire bus for full-duplex transmission; a serial clock line (spi_clk) and two serial data lines (spi_miso,spi_mosi) ? a 4-wire bus for full-duplex transm ission plus handshaking can be impl emented by also utilizing the chip select (spi_cs). this pin can be used for indi cating the beginning of a new byte sequence. ? master or slave operation ? clock control - polarity (idle low/high) and phase (sample data with rising/falling clock edge) are programmable ? bit width (1 to 8 bits) and bit order (msb or lsb first) are configurable ? compatible with ssc (high-speed synchronous serial interface) and standard spi interfaces ? protocol is defined by software 2.17.1 spi functionality the basic interaction principle between ma ster and slave spi devices is shown in figure 60 . writing to the spi shift register of the master spi device starts the spi clock generation (line sck). the two 8 bit shift registers in master and slave device can be considered as one dist ributed circular shift register (including line miso and mosi). when data is shifted from the master to the sl ave with the generated clock, dat a is also shifted in the opposite direction simultaneously. during one shift cycle, da ta in the master and the slave is interchanged resulting a full duplex transmission. figure 60 spi principle different spi devices are connected through three lines. t he definition of these lines is always determined by the master. the line connected to the master's data output is the transmit line mosi 1) , the receive line is connected to its data input line miso 2) . the serial clock is distributed over line sck 3) . only the device selected for master operation generates and outputs the serial clock. all slaves receive and react to this clock. 1) mosi = master out slave in 2) miso = master in slave out 3) sck = serial clock 8 bit shift-register 8 bit shift-register miso mosi miso mosi sck sck miso mosi sck spi master device spi slave device spi clockgen
pma51xx functional description data sheet 166 revision 2.1, 2010-06-02 the output of the master's shift register is connected to the external transmit line, which in turn is connected to the slaves' shift register input (mosi). the output of the slaves' shift register is connected to the external receive line in order to enable the master to receive the data shift ed out of one slave (miso). th e external connections are hard-wired, the function and direction of the pins are determined by configuration as master- or slave device. when initializing the devices select on ly one device for master operation, all others must be programmed for slave operation. initialization includes the operating mode (clock phase, clock polarity, data byte order, bit width and transfer rate). to deselect the actual master (slave-s elect functionality) and re-e stablish connection with another master, a corresponding pr otocol has to be fulfilled by software using an additional free port pin. to avoid collisions on line miso due to several slave device s, only one slave is allowed to pull the line to low (wired and connection), i.e. enables the driver of its pin. only this slave can put its data onto the master's receive line and only receiving of data from the master is possible. th e master selects the slave de vice from which it expects data either by separate select lines (free port lines), or by using a suitable protocol to tell all the other slave devices to only output state high on line miso. according to the hard-wired connection, two different oper ation modes are possible - full-duplex and half-duplex operation. 2.17.1.1 full-duplex operation the master device line mosi (master out) is connected to line mosi of all sl ave devices (slave in). accordingly line miso is connected between master and slave devices. additionally to this two data lines the clock line sck has to be wired respectively. this way data are transmit ted across a 3-wire bus in full duplex mode (refer to figure 61 ). data bytes are transmitted fr om master to slave and simultaneously from slave to master. figure 61 full-duplex configuration spi shift register spi shift register miso mosi sck master slave spi clockgen miso mosi sck device #2 device #1 spi clockgen spi shift register slave miso mosi sck device #3 spi clockgen clock receive transmit
pma51xx functional description data sheet 167 revision 2.1, 2010-06-02 2.17.1.2 half-duplex operation in a half-duplex configuration only one data line is necessary for both receiving and transmitting data. figure 62 shows, that line miso and mosi of each master and slave device is shortened to one data line. the clock line sck is connected exclusively. the master device controls the data transfer by generating the shift clock, while the slave device receives it. figure 62 half-duplex configuration due to the fact that all transmit and receive pins are co nnected to one data line, an appropriate protocol has to be used to avoid collisions, i.e. only one de vice (master or slave) may transmit da ta unidirectional, a ll other (arbitrary) devices are only allowed to receive these data (therefore the shift register has to contain ff h ). because line miso and mosi of each device is shortened, the transmit ting device will clock its own data at the input pin. by these means any corruptions on the common data exchange line are detected. spi shift register spi shift register miso mosi sck master slave spi clockgen miso mosi sck device #2 device #1 spi clockgen spi shift register slave miso mosi sck device #3 spi clockgen clock common transmit rec ei ve li ne
pma51xx functional description data sheet 168 revision 2.1, 2010-06-02 2.17.1.3 data modes there are four combinations of sck phas e and polarity with respect to serial data, which is determined by control bits spic.2[cpha] and sp ic.3[cpol] (refer to figure 63 ). additionally the data order (bit spic.5[dord]) (msb- first or lsb-first) and the data width (bit spim.2:0[dws]) (variable from 1 to 8 bits) may be changed. figure 63 spi data modes 1 2 3 4 5 6 7 8 msb65432 lsb 1 msb 65432 lsb 1 * sck cycle # sck (cpol=1) mosi (from master) miso (from slave) spi transfer mode 0 (format with cpol=1, cpha=1, dord=1 ) 1 2 3 4 5 6 7 8 msb65432 lsb 1 msb 65432 lsb 1 * sck cycle # sck (cpol=0) mosi (from master) miso (from slave) spi transfer mode 2 (format with cpol=0, cpha=1, dord=1 ) 1 2 3 4 5 6 7 8 msb65432 lsb 1 654321 sck cycle # sck (cpol=1) mosi (from master) miso (from slave) spi transfer mode 1 (format with cpol=1, cpha=0, dord=1 ) 1 2 3 4 5 6 7 8 msb65432 lsb 1 msb65432 lsb 1 * sck (cpol=0) spi transfer mode 3 (format with cpol=0, cpha=0, dord=1 ) msb * lsb mosi (from master) miso (from slave) sck cycle # chip select next byte end of transfer next byte end of transfer chip select next byte end of transfer chip select next byte end of transfer chip select
pma51xx functional description data sheet 169 revision 2.1, 2010-06-02 2.17.2 module structure figure 64 points out the main blocks inside the spi modu le. the pin control block separates and assigns incoming and outgoing spi signals. according to this sig nals and the configurations done in spi control register (spic) and spi mode register (spim) the spi control bl ock coordinates shift register shift-in and shift-out. the clock control block is only relevant in spi master mode: the spi clock is generated by the internal baud rate timer. the baud rate timer is a 8 bit down counter, its overrun toggles the spi clock. transmit buffer and receive buffer are used to store incomi ng and outgoing data bytes. outgoing data bytes are first transferred from transmit buffer to the shift register that dispenses bi t by bit in compliance to the data order (msb or lsb first) set by bit spic.5[dord]. at start of a frame 2 bytes can be written into the tx buffer. first is moved through tx buffer into shift register. second byte is hold in tx buffer until first byte was sent. incoming data bits are collected in the shift register. if all bits are received - th e exact amount is defined by spim.2-0[dws2-0] - the whole byte is moved to receive buffer. figure 64 spi module structure 2.17.3 interrupt support six events generates an interrupt. first three sources are normal operating interrupts, last three are failures: ? receive buffer full (spis.1[ srbf]) and reload tx buffer as one single event because of spi behavioral. ? chip select (spi_cs) detected (spis.3[scsd]) (slave mode only). ? chip select (spi_cs) lost and the last word was tr ansferred completely (slave mode only). ? receive buffer over run (spis.7[sre]) (d ata lost) detected. ? phase erro r detected (spis.5[spe]). transmit buffer reg . receive buffer reg . shift register clock control spi control spi control reg . spi mode reg . spi status reg . data order bit w idth pin control clock phase clock polarity spi enable master/slave clock spi baud rate reg . spi baud rate timer interrupt falling out _en rising level falling out _en rising rising level data bus falling miso mosi sck scs falling out _en rising level
pma51xx functional description data sheet 170 revision 2.1, 2010-06-02 ? slave communication corrupt detected (spis.4[sscc]). in this case the slave sele ct was lost within a word (slave mode only). all these interrupt source bits are located in the status register (spis) and will be cleared on read access. a read access to status register acknowledges the interrupt. it is not possible to mask one or more of these interrup t sources individually, only all spi interrupts can be masked by setting sfr bit ie.5 [espi] to 0 b . 2.17.4 spi programming instructions to enable the spi-bus interface bit cfg1.2[spien] has to be set. resume with setting correct configuration in control and mode register (spic and spim). 2.17.4.1 slave mode sequence once the spi interface has been enabled, configured as sl ave, and selected via chip se lect (spi_cs/pp3), it waits for incoming data, which are shifted- in synchronously to the delivered spi clock. there are two possibilities to select the slave: 1. the spi slave is selected by the master via an hard-wired signal connected to spi_cs/pp3. 2. the spi slave sets the chip select to 0 b by setting pp3 direction to output and pp3 to 0 b . after all bits has been transmitted, bit spis.1[srbf] is se t and the data can be read out from register spid. if data should be (according to the realized protocol) transmitt ed simultaneously to the next incoming data byte, simply write the desired byte to the spi data register spid. 2.17.4.2 master mode sequence after enabling the spi interface and configuration as ma ster device it waits for further actions. data are transmitted/received as soon as the spi data register spid is written. if more than one data byte has to be transmitted keep in mind to check bit spis.0[stbf] to no t overwrite the old data byte. in full duplex mode data bytes are simultaneously received from slave devices. if a byte has to be read according to the implemented protocol simply check bit spis.1 [srbf] in status register and read out t he received value from register spid. 2.17.5 register description table 27 registers overview register short name register long name offset address wakeup value page number spib spi baud rate register f3 h 00 h 171 spic spi control register f4 h 00 h 172 spid spi data register f5 h 00 h 173 spim spi mode register f6 h 00 h 173 spis spi status register f7 h 41 h 175
pma51xx functional description data sheet 171 revision 2.1, 2010-06-02 spi baud rate register the internal baud rate timer is needed only in master mo de. it is implemented as 8-bit down counter. the register spib holds counter?s reload value. a underrun from 00 h to ff h initiates both timer rel oad and a spi clock event. this spi clock event generates either a rising or falling edge on the spi clock line. for a full spi clock cycle two spi clock events are necessary. the baud rate can be calculated by the formula shown in figure 65 . figure 65 calculation of spi baud rate all reload values for spib from 00 h to ff h are valid. spib offset wakeup value reset value spi baud rate register f3 h 00 h 00 h field bits type description spib 7:0 w spi baud rate register reload value for baud rate timer () ? ? ? ? ? ? ? ? ? + = 2 1 spib ] hz [ f ] hz [ f sys spi 7 0 7 0 w spib
pma51xx functional description data sheet 172 revision 2.1, 2010-06-02 spi control register spic offset wakeup value reset value spi control register f4 h 00 h 00 h field bits type description res 7 reserved csen 6 rw chip select enable (slave mode only) resets the internal fsm if cs is lost during transmission in slave mode. 0 b disable spi chip select 1 b enable spi chip select dord 5 rw data order defines the bit order for transmission. 0 b lsb is transmitted first 1 b msb is transmitted first mstr 4 rw master/slave select defines if the module operates as master or slave device. 0 b slave (controls spi_miso) 1 b master (controls spi_mosi, spi_clk) cpol 3 rw clock polarity selection defines the initial st ate of spi clock line. 0 b idle clock line is low and lead ing clock edge is a low to high transition. 1 b idle clock line is high and leading clock edge is a high to low transition. cpha 2 rw clock phase selection determines whether da ta are active with rising or falling edge of spi clock line. 0 b transmission starts without a risi ng or falling edge on spi clock. with first edge detected the firs t data bit is latched, with the following edge data are shifted. 1 b a rising or falling edge is generat ed on spi clock line before data are set. with the following clock edge data are latched before shifted on with consecutive one. res 1:0 reserved 7 0 7 7 res 6 6 rw csen 5 5 rw dord 4 4 rw mstr 3 3 rw cpol 2 2 rw cpha 10 res
pma51xx functional description data sheet 173 revision 2.1, 2010-06-02 spi data register spi mode register spid offset wakeup value reset value spi data register f5 h 00 h 00 h field bits type description spid 7:0 rw spi data register read from rx buffer and write to tx buffer spim offset wakeup value reset value spi mode register f6 h 00 h 00 h field bits type description fl 7 rw spi force level select output mode for spi lines spi_miso, spi_mosi and spi_clk. 0 b spi lines are pull-up driven weak high level 1 b spi lines are active driven high level res 6:5 reserved algn 4 rw data alignment defines the bit alignment for spi transm ission. this is only relevant in case, data width selection is not 8 bits (see dws). 0 b right align 1 b left align res 3 reserved 7 0 7 0 rw spid 7 0 7 7 rw fl 65 res 4 4 rw algn 3 3 res 20 rw dws
pma51xx functional description data sheet 174 revision 2.1, 2010-06-02 dws 2:0 rw data width selection defines the number of transmitted bits per byte. 000 b 8 bits 001 b 1 bit 010 b 2 bits 011 b 3 bits 100 b 4 bits 101 b 5 bits 110 b 6 bits 111 b 7 bits field bits type description
pma51xx functional description data sheet 175 revision 2.1, 2010-06-02 spi status register spis offset wakeup value reset value spi status register f7 h 41 h 41 h field bits type description sre 7 rc spi receive error is set by hardware if a new data frame is completely received but the previous data was not read out from the receive data buffer spid (data will be overwritten). this bit acts as in terrupt request flag. it is cleared by hardware on read access. 0 b normal state 1 b error occurred ste 6 r spi transmission completed this bit is set if the spi transmission has been completed. 0 b transmission running 1 b transmission completed spe 5 rc spi phase error is set by hardware if the incoming data at pin miso (master mode) respectively mosi (slave mode) sampled with cpu clock, changes between 1 sample before and 2 samples after latching edge of the clock signal. this bit acts as interrupt request flag. it is cleared by hardware on read access. 0 b normal state 1 b phase error detected sscc 4 rc spi slave communication corrupted set by hardware if the ch ip select is lost during transmission (in slave mode only). this bit acts as inte rrupt request flag. it is cleared by hardware on read access. 0 b normal state 1 b transmission corrupted scsd 3 rc spi chip select detected set by hardware in slav e mode only if an fallin g edge is detected on spi- cs pin (spi transmission start). this bit acts as interrupt request flag. it is cleared by hardware on read access. 0 b inactive 1 b chip select detecte d (falling edge on chip select detected) 7 0 7 7 rc sre 6 6 r ste 5 5 rc spe 4 4 rc sscc 3 3 rc scsd 2 2 rc scsl 1 1 rc srbf 0 0 r stbe
pma51xx functional description data sheet 176 revision 2.1, 2010-06-02 scsl 2 rc spi chip select lost set by hardware in slave mode if a rising edge is detected on spi-cs. this bit acts as interrupt request flag. it is cleared by hardware on read access. 0 b inactive 1 b chip select lost (rising edge on chip select detected) srbf 1 rc spi receive buffer full is set by hardware if a data byte is received completely. the receive buffer (spid) is ready to be read. this bit acts as interrupt request flag. it is cleared by hardware on read access. 0 b no new data in receive buffer 1 b new data in receive buffer stbe 0 r spi transmit buffer empty is reset by hardware if register spid is written and automatically set if data byte is transf erred to spi internal shift register. 0 b there are still data in transmit buffer 1 b transmit buffer is empty field bits type description
pma51xx functional description data sheet 177 revision 2.1, 2010-06-02 2.18 programming mode operation in programming mode, the pma 51xx is accessible as a slave using the i2c interface. the device uses the internal 12 mh z rc hf oscillator as its clock source. to avoid programming failures, all programming mode commands are protected by a 16-bit crc at the end of each command ( chapter 2.12 shows details about the crc polynomial used). the checksum has to be calculated over all bytes in the command excluding the pma51xx i2c device address. figure 66 ?legend for i 2 c-commands in programming mode? on page 177 shows the legend used for the description of the i 2 c commands. programming mode commands ? flash write line ? flash erase ? flash check erase status ? flash read line ? flash set lockbyte 3 ? flash read status figure 66 legend for i 2 c-commands in programming mode 2.18.1 flash write line the flash write line command writes 32 bytes to the flash. the flash code sector and flash user data sectors can be written using this command. th e start address has to be a multiple of 20 h . as shown in figure 12 flash address range 4000 h to 587f h is accessible. this command should only be used if the flash line is fully erased. if an already programmed flash line gets overwritten (without being erased first) the resulting data is undefined. after the stop condition (p) is received the data is programmed into the flash. during the programming time incoming i 2 c commands are not acknowledged. programming time is specified in table 46 . figure 67 shows the structure of the flash write line command. it is important to note that no type of verification is performed after a write. in order to see if this write command was successful, a read status command must be issued, or a flash read line command may be used to read back the stored values. note: 1. if transferring the start address, the lower 5 bits are cleared automatically. 2. if less than 36 data bytes are received, nothing is wr itten into the flash. the read status command can be used to check an invalid command length error. 3. if an already written section in the flash gets re-wri tten (without being erased before), the resulting data is undefined. from programmer to pma from pma to programmer s p na start condition stop condition not acknowledge restart condition or stop / start condition sr a acknowledge sector status crch crcl msb of crc checksum lsb of crc checksum pause selection of the sector status byte time where no communication is allowed data0-31 data which is written into / read from flash
pma51xx functional description data sheet 178 revision 2.1, 2010-06-02 4. after the stop condition (p) is received the data is programmed into the flash. during the programming time incoming i 2 c commands are not acknowledged. figure 67 flash write line command 2.18.2 flash read line the contents of the flash memory (4000 h to 587f h ) can be read out via the i 2 c interface. figure 68 shows the structure of the flash read line command. figure 68 flash read line command 2.18.3 flash erase the flash erase command is show in figure 69 and can be used to erase the code sector and the user data sectors. the flash erase time is specified in table 46 . figure 70 and table 28 describe the bits of the sector byte. note: after the stop condition (p) is received the selected flash sectors are being erased. during the erase time incoming i 2 c commands are not acknowledged. figure 69 flash erase command figure 70 flash erase: sector byte table 28 flash erase: sector byte bits field description 2udsec ii0 b : don?t erase user data sector ii 1 b : erase whether user data sector ii is erased 1udsec i0 b : don?t erase user data sector i 1 b : erase whether user data sector i is erased 0csec 0 b : don?t erase code sector 1 b : erase whether code sector is erased s 6c h a addrhi a addrlo a data0 a ... a data31 a crch a crcl a p s 6c h a addrhi a addrlo a sr a ... a data31 a crch a crcl na p 6d h data0 a s 6c h a a2 h a sector a crch a crcl a p don?t care udsec i 1 0 7 2 csec udsec ii
pma51xx functional description data sheet 179 revision 2.1, 2010-06-02 2.18.4 flash check erase status this function returns the status of the selected flash sector(s). the time required for checking the sectors depends on the selected sectors. the structure of the i 2 c command flash check erase status is shown in figure 71 . figure 72 and table 29 describe the bits of the sector byte . the status byte is illustrated in figure 73 and table 30 . note: after the first stop condition (p) is received the selected flash sectors are c hecked. during this time incoming i 2 c commands are not acknowledged. figure 71 flash check erase status command figure 72 flash check erase status: sector byte figure 73 flash check erase status: status byte 2.18.5 flash set code lock (lockbyte 2) to set lockbyte 2 d1 h has to be written to flash address 577f h (top address of code sector). after the lockbyte 2 is set, a startup in debug or programming mode is not possible any more. note: to activate the code sector lock the pma51xx ha s to be reset a fter lockbyte d1 h has been set. table 29 flash check era se status: sector byte bits field description 2udsec ii0 b : don?t check user data sector ii 1 b : check whether user data sector ii is erased 1udsec i0 b : don?t check user data sector i 1 b : check whether user data sector i is erased 0csec 0 b : don?t check code sector 1 b : check whether code sector is erased table 30 flash check erase status: status byte bits field description 2udsec ii0 b : user data sector ii is erased or untested 1 b : at least one bit is set in user data sector ii 1udsec i0 b : user data sector i is erased or untested 1 b : at least one bit is set in user data sector i 0csec 0 b : code sector is erased or untested 1 b : at least one bit is set in code sector s 6c h a a3 h a sector a a pause status a crch a crcl na p a p 6d h s a > 35ms crch crcl don?t care udsec i 1 0 7 2 csec udsec ii don?t care udsec i 1 0 7 2 csec udsec ii
pma51xx functional description data sheet 180 revision 2.1, 2010-06-02 2.18.6 flash set user data sector lock (lockbyte 3) this command sets the lockbyte for flash user data sectors i + ii. note: it is required to set code sector lock (lockbyte 2) to enable user data sector lock (lockbyte 3) to become effective. note: to activate the user data sector lock (lockbyte 3) the pma51xx has to be reset after setting the lockbytes for user data sector and code sector. figure 74 flash set lockbyte 3 command 2.18.7 read status this function is intended to read out the status of the previous executed functions (pass/fail). it can be called whenever desired to verify if th ere were errors since the last read status call. figure 76 and table 31 describe the bits of the status byte. figure 75 read status command figure 76 read status: status byte table 31 read status: status byte bits field description 7:4 cmdcnt number of executed command s since the first detected error. 1111 b : 15 commands or more 1110 b : 14 commands ... 0001 b : 1 command 0000 b : error occurred in last command 3:2 errcnt erroneous events since the last read status call. 11 b : three or more errors 10 b : two errors 01 b : one error 00 b : no error 1 invcmdl 1 b : invalid command length or execution fail since the last read status call 0 b : command length and execution correc t since the last read status call 0 crcfail 1 b : crc failure detected since the last read status call 0 b : no crc error occurred since the last read status call s 6c h a a1 h a crch a crcl a p s 6c h a a4 h a a a pause status a crch a crcl na p crch crcl p 6d h s a > 9s invcmdl crcfail 1 0 7 2 3 4 errcnt cmdcnt
pma51xx functional description data sheet 181 revision 2.1, 2010-06-02 2.19 debug mode operation debugging of the pma is done via the i 2 c interface, therefore the i 2 c interface must not be reconfigured in debug mode. furthermore debugging of the i 2 c interface itself is not possible and will lead to debugging errors. note: the flash is protecte d against write access in debug mode. ram area eb h - ff h is used by the debugger and must not contain any application code when pma is used in debug mode. 2.19.1 rom debug function the debug function mainly consists of a debug handler and a single stepper. the debug handler processes the i 2 c communication and debug command interpretation. the debug commands setsfr, readsfr, setdata, readdata and setpc, readpc are executed directly by the debug handler. the debug commands single step, run interruptible and run until breakpoint are executed by the single stepper. the single stepper fetches the current opco de and enables opcode execution depending on the debug command. 2.19.2 debug mode commands in debug mode the pma51xx is acce ssible as a slave using the i 2 c interface. figure 77 shows the legend used for the description of the i 2 c commands. figure 77 legend for i 2 c communication in debug 2.19.2.1 set sfr set an sfr to a user-defined value. figure 78 set sfr command addr: address of sfr to be set. data: byte value that is written in to the sfr address specified by addr . from debugger to pma from pma to debugger s p na start condition stop condition not acknowledge restart condition or stop / start condition sr a acknowledge addr pcl sfr / idata / xdata address program counter low byte pause time where no comunication is allowed data data byte read from / written to sfr / idata / xdata pch program counter high byte bpl break point low byte bph break point high byte s 6c h a 00 h a addr a data a p
pma51xx functional description data sheet 182 revision 2.1, 2010-06-02 2.19.2.2 read sfr read the value of one sfr. figure 79 read sfr command addr: address of sfr to be read. data: byte value that is read from the sfr at address specified by addr . 2.19.2.3 set idata set one byte in the internal data memory (ram) to a user-defined value. figure 80 set idata command addr: address of the internal data memory to be set (range: 00 h - ff h ). data: byte value that is written into the inte rnal data memory at address specified by addr . 2.19.2.4 read idata read one byte of the inte rnal data memory (ram). figure 81 read idata command addr: address of the internal data memory to be read (range: 00 h - ff h ). data: byte value that is read from the internal data memory at address specified by addr . 2.19.2.5 set xdata set one byte in the external data memory (battery buffered data ram) to a user-defined value. figure 82 set xdata command addr: address of the external data memory to be set (range: 00 h - 0f h ). data: byte value that is written into the exte rnal data memory at address specified by addr . s 6c h a 03 h a addr a data a p pause > 9 s s 6d h na p s 6c h a 06 h a addr a data a p s 6c h a 09 h a addr a data a p pause > 9 s s 6d h na p s 6c h a 1b h a addr a data a p
pma51xx functional description data sheet 183 revision 2.1, 2010-06-02 2.19.2.6 read xdata read one byte of the external data memory (battery buffered data ram). figure 83 read xdata command addr: address of the external data memory to be read (range: 00 h - 0f h ). data: byte value that is read from the external data memory at address specified by addr . 2.19.2.7 set pc set the program counter to a user-defined value. figure 84 set pc command pcl: msb of the new program counter. pch: lsb of the new program counter. 2.19.2.8 read pc reads the program counter. figure 85 read pc command pcl: msb of the actual program counter. pch: lsb of the actual program counter. 2.19.2.9 single step execute one opcode instruction and return to the debug handler. note: a library function can not be single stepped and is stepped through automatically until the flash is re- entered. figure 86 single step 2.19.2.10 run interruptible the function consists of device inter nal consecutive single steps until any i 2 c command is received on the bus. compared to running the program in real time this function has a slower execution speed by a factor of about 1/50, dependent on the executed program. figure 87 run interruptible s 6c h a 1e h a addr a data a p pause > 9 s s 6d h na p s 6c h a 0c h a pch a pcl a p s 6c h a 0f h a pch a p pause > 9 s s 6d h na p pcl a s 6c h a 12 h a p s 6c h a 15 h a p
pma51xx functional description data sheet 184 revision 2.1, 2010-06-02 2.19.2.11 run until breakpoint the debugged program is executed without single steps in real time. this enables debugging of runtime critical functions like rf-transmission or lf data receiving. the execution is st opped when the pc matches the defined breakpoint. note: if the breakpoint is not hit the communication to the debugger is lost. figure 88 run until breakpoint s 6c h a 18 h a p bph a bpl a
pma51xx reference data sheet 185 revision 2.1, 2010-06-02 3 reference 3.1 electrical data 3.1.1 absolute maximum ratings attention: stresses above the max. values listed here may cause permanent damage to the device. exposure to absolute maximum rating conditions for extended periods may affect device reliability. maximum ratings are absolute ratings; exceeding only one of these values may cause irreversible damage to the integrated circuit. attention: test means that the parameter is not subject to production test. it was verified by design/characterization. table 32 absolute maximum ratings parameter symbol values unit note / test condition test number min. typ. max. supply voltage v bat -0.3 +4.0 v 1.1 operating temperature t j -40 +125 c 1.2 esd hbm integrity v hbm 2 kv all pins according to esd standard jedec eia / jesd22-a114-b 1.3 latch up i lu -100 +100 ma eia jesd78a 1.4 input voltage at digital input pins v indigital -0.3 v bat +0.3 v 1.5 lf receiver input voltage v inlf -0.3 +0.3 v 1.6 input and output current for digital i/o pins i iomax 4 ma less than 10 ma on all digital pins 1.7 lf receiver input current i lfin 4ma 1.8 xtal input voltage v inxt -0.3 v reg +0.3 v 1.9 storage temperature t s -40 +150 1) c 1) max 1000 hours accumulated ov er lifetime 1.10
pma51xx reference data sheet 186 revision 2.1, 2010-06-02 3.1.2 operating range within the operational range the ic operates as explained in the circuit description. 3.1.3 product characteristics product characteristics involve the spread of values guaranteed within the specified voltage and ambient temperature range. typical characteristics are th e median of the production. supply voltage: v bat = 1.9v ... 3.6v, unless otherwise specified ambient temperature: t amb = -40c ... +125c, unless otherwise specified 3.1.3.1 temperature sensor 3.1.3.2 battery sensor table 33 operating range parameter symbol values unit note / test condition test number min. typ. max. supply voltage v bat1 2.1 3.6 v temperature sensor, lf receiver and flash programming 2.1 v bat2 1.9 3.6 v every module which is not mentioned at 2.1 (v bat1 ) 2.2 ambient temperature range t amb -40 125 c normal operation 2.4 t flc 0 85 c flash code sector programming 2.5 t fld -40 85 c flash data sector programming 2.6 table 34 temperature sensor characteristics parameter symbol values unit note / test condition test number min. typ. max. measurement error t error -3 +3 c t = -20 ... 70c 3.1 measurement error -5 +5 c t = t j 3.2 table 35 battery sensor characteristics parameter symbol values unit note / test condition test number min. typ. max. measurement error v error -100 100 mv 4.1
pma51xx reference data sheet 187 revision 2.1, 2010-06-02 3.1.3.3 supply currents table 36 supply currents parameter symbol values unit note / test condition test number min. typ. max. supply current rf transmission fsk modulation i 5dbm 9,7 ma f = 315 mhz, v bat = 3 v, t = 25c sfr divic = 03 h 5.1 i 8dbm 12,2 ma 5.2 i 10dbm 12,8 ma 5.3 supply current rf transmission fsk modulation i 5dbm 9,9 ma f = 434 mhz, v bat = 3 v, t = 25c sfr divic = 03 h 5.4 i 8dbm 12,3 ma 5.5 i 10dbm 13,8 ma 5.6 supply current rf transmission fsk modulation i 5dbm 11,8 ma f = 868 mhz, v bat = 3 v, t = 25c sfr divic = 03 h 5.7 i 8dbm 12,9 ma 5.8 i 10dbm 16,9 ma 5.9 supply current rf transmission fsk modulation i 5dbm 12,6 ma f = 915 mhz, v bat = 3 v, t = 25c sfr divic = 03 h 5.10 i 8dbm 15,3 ma 5.11 i 10dbm 17,1 ma 5.12 supply current rf transmission fsk modulation i 5dbm 8,9 ma f = 315 mhz, v bat = 3 v, t = -40c sfr divic = 03 h 5.13 i 8dbm 11 ma 5.14 i 10dbm 12 ma 5.15 supply current rf transmission fsk modulation i 5dbm 9,2 ma f = 434 mhz, v bat = 3 v, t = -40c sfr divic = 03 h 5.16 i 8dbm 11,5 ma 5.17 i 10dbm 12,9 ma 5.18 supply current rf transmission fsk modulation i 5dbm 11,3 ma f = 868 mhz, v bat = 3 v, t = -40c sfr divic = 03 h 5.19 i 8dbm 12,8 ma 5.20 i 10dbm 16,8 ma 5.21 supply current rf transmission fsk modulation i 5dbm 11,3 ma f = 915 mhz, v bat = 3 v, t = -40c sfr divic = 03 h 5.22 i 8dbm 13,4 ma 5.23 i 10dbm 16,7 ma 5.24 supply current rf transmission fsk modulation i 5dbm 10,9 ma f = 315 mhz, v bat = 3 v, t = 125c sfr divic = 03 h 5.25 i 8dbm 13,1 ma 5.26 i 10dbm 13,9 ma 5.27 supply current rf transmission fsk modulation i 5dbm 11,1 ma f = 434 mhz, v bat = 3 v, t = 125c sfr divic = 03 h 5.28 i 8dbm 13,4 ma 5.29 i 10dbm 15 ma 5.30 supply current rf transmission fsk modulation i 5dbm 12,3 ma f = 868 mhz, v bat = 3 v, t = 125c sfr divic = 03 h 5.31 i 8dbm 11,6 ma 5.32 i 10dbm 16,3 ma 5.33
pma51xx reference data sheet 188 revision 2.1, 2010-06-02 3.1.3.4 rf-transmitter the rf transmitter is characterized on the evaluation board with 50 ohm matching network for specified frequency. the schematic and t he element values of the matching network can be found in figure 89 ?matching network for the power amplifier? on page 196 and table 50 ?values of the matching network for the power amplifier? on page 196 . tolerances of the passive el ements not taken into account. supply current rf transmission fsk modulation i 5dbm 13,3 ma f = 915 mhz, v bat = 3 v, t = 125c sfr divic = 03 h 5.34 i 8dbm 14,8 ma 5.35 i 10dbm 16,7 ma 5.36 supply current power down i pd 590 na v bat = 3.0v, t = 25c 5.37 10,8 a v bat = 3.0v, t = 125c 5.38 supply current idle i idle 0,80 ma v bat = 3.0v, t = 25c (sfr divic = 00 h , system clock = 12 mhz rc osc.) 5.39 0,93 ma v bat = 3.0v, t = 125c (sfr divic = 00 h , system clock = 12 mhz rc osc.) 5.40 supply current run i run 1,87 ma v bat = 3.0v, t = 25c (sfr divic = 00 h , system clock = 12 mhz rc osc.) 5.41 2,0 ma v bat = 3.0v, t = 125c (sfr divic = 00 h , system clock = 12 mhz rc osc.) 5.42 table 37 rf transmitter parameter symbol values unit note / test condition test number min. typ. max. transmit frequency f tx 300 320 mhz 6.1 433 450 mhz 6.2 865 870 mhz 6.3 902 928 mhz 6.4 data rate dr rf 32 kbps t=-40c - 85c (64 kchips/s) 6.5 20 kbps t=-40c - 125c (40 kchips/s) 6.6 output power op rf 5dbmt=25c, v bat =3v 6.7 8dbmt=25c, v bat =3v 6.8 10 dbm t=25c, v bat =3v 6.9 carrier to spurious ratio (incl. harmonics) @d1=315/915mhz -28 dbc fcc 15.231a/b/e 2 nd to 10 th harmonic rbw = 100khz 6.10 table 36 supply currents (cont?d) parameter symbol values unit note / test condition test number min. typ. max.
pma51xx reference data sheet 189 revision 2.1, 2010-06-02 3.1.3.5 lf receiver the lf receiver is only available on pma5110. carrier to noise ratio @d1=315/915mhz -20 dbc fcc 15.231a/b/e rbw = 100khz measured at frequency edge: 0,25%*f c for 315mhz 0,5%*f c for 915mhz f c :carrier frequency 6.11 ssb phase noise @d1=315mhz -95 -89 dbc/hz rbw = 100khz, +25c @ 10khz offset, 6.12 -93 -87 dbc/hz @ 100khz offset, 6.13 -120 -114 dbc/hz @ 1mhz offset, 6.14 -136 -130 dbc/hz @ 10mhz offset 6.15 ssb phase noise @d1=434mhz -93 -87 dbc/hz rbw = 100khz, +25c @ 10khz offset, 6.16 -90 -84 dbc/hz @ 100khz offset, 6.17 -113 -107 dbc/hz @ 1mhz offset, 6.18 -132 -126 dbc/hz @ 10mhz offset 6.19 ssb phase noise @d1=868mhz -87 -81 dbc/hz rbw = 100khz, +25c @ 10khz offset, 6.20 -85 -79 dbc/hz @ 100khz offset, 6.21 -110 -104 dbc/hz @ 1mhz offset, 6.22 -134 -128 dbc/hz @ 10mhz offset 6.23 ssb phase noise @d1=915mhz -86 -80 dbc/hz rbw = 100khz, +25c @ 10khz offset, 6.24 -85 -79 dbc/hz @ 100khz offset, 6.25 -109 -103 dbc/hz @ 1mhz offset, 6.26 -135 -129 dbc/hz @ 10mhz offset 6.27 table 38 lf receiver, v bat = 2.1-3.6v parameter symbo l values unit note / test condition test number min. typ. max. lf baseband sensitivity s lf1 2.5 mv pp after calling a library function for calibration. t=25c, v bat =3v 7.1 data rate dr lf 2 4 kbit/s 7.2 data rate error dr error -2 2 % 7.3 carrier frequency f clf 120 125 130 khz 7.4 table 37 rf transmitter (cont?d) parameter symbol values unit note / test condition test number min. typ. max.
pma51xx reference data sheet 190 revision 2.1, 2010-06-02 3.1.3.6 crystal oscillator lf current consumption i lf_afe 1 a25c; 3v analog frontend only 7.5 i lf_bb 440 a25c; 3v including baseband 7.6 input dynamic range dr lf 70 db lf baseband sensitivity , agc enabled 7.7 differential input capacitance c inlf 15 pf @125 khz 7.8 differential input resistance r inlf 500 kohm agc disabled 7.9 preamble length t preamble 2 ms included in reference datagram 7.10 carrier detector freeze hold time t cdch 2 s worst case @ 125c 7.11 table 39 crystal oscillator parameter symbol values unit note / test condition test number min. typ. max. crystal startup time t xtal 1.2 ms ifx testboard with these crystals 1) 2) 3) 4) 1) nx5032sa exs00a-cs00269 c l = 12pf, f crystal = 19,6875 mhz 2) nx5032sa exs00a-cs00270 c l = 12pf, f crystal = 19,0625 mhz 3) nx5032sa exs00a-cs00271 c l = 12pf, f crystal = 18,089583 mhz 4) nx5032sa exs00a-cs00272 c l = 12pf, f crystal = 18,080 mhz 8.1 crystal oscillator startup delay time t xtaladj 01750 s progammable in 250 s steps sfr xtcfg 8.2 crystal frequency f xtal 18 20 mhz 8.3 parasitic capacitance c pcbmax 4 pf determined by pcb layout 8.4 serial resistance of the crystal r rmax 60 ohm 8.5 input inductance xtalout l osc 2.2 uh 8.6 crystal fine tuning capacitance c tune 40 pf selectable with 156 ff resolution (8 bits) 8.7 table 38 lf receiver, v bat = 2.1-3.6v (cont?d) parameter symbo l values unit note / test condition test number min. typ. max.
pma51xx reference data sheet 191 revision 2.1, 2010-06-02 3.1.3.6.1 crystal osc illator recommendation as crystal oscillator for pma51xx nx5032sd table 40 ndk crystal oscillator recommendation for pma51xx nominal frequency (mhz) ndk specification number shunt capacitance (c 0 ) motional capacitance (c 1 ) 19.6875 exs00a-02825 1.58pf15% 6.73ff15% 19.0625 exs00a-03550 1.64pf15% 6.97ff15% 18.089583 exs00a-03551 1.55pf15% 6.50ff15% 18.080 exs00a-03552 1.60pf15% 6.70ff15%
pma51xx reference data sheet 192 revision 2.1, 2010-06-02 3.1.3.7 12 mhz rc hf oscillator 3.1.3.8 2 khz rc lp oscillator table 41 12 mhz rc hf oscillator parameter symbol values unit note / test condition test number min. typ. max. operating frequency f rchf -3% 12.00 +3% mhz v bat = 3.0v, t = 25c 9.1 overall drift df rchf -5 +5 % 9.2 table 42 2 khz rc lp oscillator parameter symbol values unit note / test condition test number min. typ. max. operating frequency f rclp 1.3 2 2.8 khz v bat = 3.0v, t = 25c 10.1 overall drift df rclp -7 +7 % referring to nominal condition 10.2
pma51xx reference data sheet 193 revision 2.1, 2010-06-02 3.1.3.9 interval timer 3.1.3.10 power on reset table 43 interval timer parameter symbol values unit note / test condition test number min. typ. max. wake-up interval timer range t wu 0.05 255 s adjustable with resolution of 8 bit. calibrated with library function. 11.1 wake-up interval timer step t wust 0.05 1 s 11.2 frequency calibration error f itce -5 +5 % t wust = 0.5s, systemclock = xtal 11.3 table 44 power on reset parameter symbol values unit note / test condition test number min. typ. max. power on reset level v por 0.2 0.4 1.7 v minimum supply voltage level measured at pin v reg for a valid logic low at power on reset circuit 12.1 power on release level v thr 1.7 1.8 v measured at pin v reg 12.2 power on reset time t por 0.25 1 10 ms 12.3 brown out detect level in run state v brd 1.7 1.8 v measured at pin v reg 12.4 brown out detect level in power down v pdbr 0.7 1.7 v measured at pin v reg 12.5 mode selection time t mode 2.5 ms 12.6 minimum detectable brown out glitch in run state t brd 1 s 12.7 minimum detectable brown out glitch in power down t brdpd 100 s 12.8
pma51xx reference data sheet 194 revision 2.1, 2010-06-02 3.1.3.11 vmin detector 3.1.3.12 6k flash code memory data 3.1.3.13 2 times 128 byte flash data memory table 45 vmin detector parameter symbol values unit note / test condition test number min. typ. max. low battery threshold warning level th lbat 2.0 2.1 2.2 v 14.1 table 46 6k flash code memory data parameter symbol values unit note / test condition test number min. typ. max. temperature range erase/program tr fl 085c 15.1 erase/program supply voltage range regulated v flbat 2.1 v 15.2 endurance data retention en flcode 1000 cycles one cycle: programming of all wordlines and erasing each sector once. 15.3 t rcode@125 c 2yrs 15.4 t rcode@85 c 40 yrs 15.5 erase time 102 ms rc hf oscillator @12 mhz 15.6 write time/line 2.2 ms rc hf oscillator @12 mhz line = 32 byte 15.7 table 47 2 times 128 by te flash data memory parameter symbol values unit note / test condition test number min. typ. max. temperature range erase/program tr fl -40 85 c 16.1 erase/program supply voltage range regulated v flbat 2.1 v 16.2
pma51xx reference data sheet 195 revision 2.1, 2010-06-02 3.1.3.14 adc interface the adc interface is only available on pma5110. 3.1.3.15 digital i/o pin endurance er data 100 1000 kcycles over lifetime retention is a function of endurance. 16.3 data retention t rdata@85 c 40 yrs 16.4 t rdata@125 c 2yrs 16.5 erase time 102 ms rc hf oscillator @12 mhz 16.6 write time/line 2.2 ms rc hf oscillator @12 mhz line = 32byte 16.7 table 48 adc interface parameter symbol values unit note / test condition test number min. typ. max. adc input voltage range vr adc gnd v reg 17.1 adc resolution r adc 10 bit 17.2 offset correction range r offc 6bit 17.3 differential non-linear ity dnl -1.0 1.0 lsb 17.4 integral non-linearity inl -1.5 1.5 lsb 17.5 table 49 digital i/o pin parameter symbol values unit note / test condition test number min. typ. max. input low voltage v il 0.5 v 18.1 input high voltage v ih v bat -0.5 v 18.2 output low voltage v ol 0.5 v i ol = 1.6ma 18.3 output high voltage v oh v bat -0.5 v i oh = -1.6ma 18.4 output transition time t thl , t tlh 30 ns 20pf load, 10% ... 90% 18.5 input capacitance c pad 2pf 18.6 internal pull-up or pull-down resistor r uppx , r downppx 1) 1) ppx are: pp0, pp1 50 kohm 18.7 internal pull-up or pull-down resistor r upppy , r downppy 2) 2) ppy are: pp2, pp3, pp4 , pp5, pp6, pp7, pp8, pp9 250 kohm 18.8 table 47 2 times 128 by te flash data memory (cont?d) parameter symbol values unit note / test condition test number min. typ. max.
pma51xx reference data sheet 196 revision 2.1, 2010-06-02 3.1.4 matching network fo r the power amplifier figure 89 and table 50 show the schematic and the element values of the matching network used for the characterization of the rf transmitter. figure 89 matching network for the power amplifier table 50 values of the matching network for the power amplifier frequency [mhz] output power [dbm] c1 [pf] c2 [pf] c3 [pf] c4 [pf] l1 [nh] l2 [nh] 315 51005,612227272 81005,612157272 10 100 4,7 22 8,2 82 72 434 51004,756183633 81004,739123636 10 100 5,6 27 12 36 33 868 5 100 1,8 27 8,2 10 10 8 100 1,8 33 6,8 10 10 10 100 2,2 56 5,6 9,5 9,5 915 5 100 1,8 33 8,2 9,5 9,5 8 100 2,2 27 6,8 9,5 9,5 10 100 1,8 18 5,6 9,5 9,5 l1 c1 3 v l2 c3 c4 c2 50ohms pa
pma51xx register overview data sheet 197 revision 2.1, 2010-06-02 4 register overview table 51 register overview register short name register long name offset address page number acc accumulator e0 h 65 adcc0 adc configuration register 0 db h 116 adcc1 adc configuration register 1 dc h 118 adcdh adc result register high byte d5 h 119 adcdl adc result register low byte d4 h 119 adcm adc mode register d2 h 120 adcoff adc input offset c-network configuration da h 121 adcs adc status register d3 h 122 b register b f0 h 65 cfg0 configuration register 0 f8 h 46 cfg1 configuration register 1 e8 h 47 cfg2 configuration register 2 d8 h 48 crc0 crc shift register low byte ac h 126 crc1 crc shift register high byte ad h 127 crcc crc control register a9 h 125 crcd crc data register aa h 126 divic internal clock divider b9 h 54 dph data pointer (high byte) 83 h 65 dpl data pointer (low byte) 82 h 65 dsr diagnosis and status register d9 h 49 extwuf external wake-up flag register f1 h 37 extwum external wake-up mask register f2 h 38 fcsp flash control register - sector protection control e9 h 59 i2cb i2c baud rate register b1 h 160 i2cc i2c control register a2 h 161 i2cd i2c data register 9a h 162 i2cm i2c mode register a3 h 162 i2cs i2c status register 9b h 163 ie interrupt enable register a8 h 69 ip interrupt priority register b8 h 70 irqfr interrupt request flag register for extended interrupts 8f h 71 itph interval timer precounter register high byte bb h 43 itpl interval timer precount er register low byte ba h 44 itpr interval timer period register bc h 44
pma51xx register overview data sheet 198 revision 2.1, 2010-06-02 lbd low battery dete ctor control ef h 50 lfcdflt lf carrier detect filtering b2 h 94 lfcdm lf carrier detector mode b5 h 95 lfdiv0 lf division factor low byte b3 h 96 lfdiv1 lf division factor high byte b4 h 96 lfoot lf on/off timer configuration register c6 h 97 lfootp lf on/off timer precounter c5 h 98 lfp0h lf pattern 0 detector sequence data msb bf h 98 lfp0l lf pattern 0 detector sequence data lsb be h 99 lfp1h lf pattern 1 detector sequence data msb cf h 99 lfp1l lf pattern 1 detector sequence data lsb ce h 100 lfpcfg lf pattern detection configuration register c7 h 100 lfrx0 lf receiver configuration register 0 b7 h 101 lfrx1 lf receiver configuration register 1 b6 h 102 lfrxc lf receiver control register f9 h 103 lfrxd lf receiver data register a5 h 104 lfrxs lf receiver status register a4 h 105 lfsyn0 lf sync pattern 0 a6 h 106 lfsyn1 lf sync pattern 1 a7 h 106 lfsyncfg lf sync matching conf iguration register af h 107 mmr0 memory mapped register 0 84 h 60 mmr1 memory mapped register 1 85 h 60 mmr2 memory mapped register 2 86 h 60 p1dir io-port 1 direction register 91 h 150 p1in io-port 1 data in register 92 h 152 p1out io-port 1 data out register 90 h 153 p1sens io-port 1 sensitivity register 93 h 154 p3dir io-port 3 direction register eb h 151 p3in io-port 3 data in register ec h 152 p3out io-port 3 data out register b0 h 153 p3sens io-port 3 sensitivity register ed h 155 psw program status word d0 h 66 ref resume event flag register d1 h 39 rfc rf transmitter control register ee h 77 rfd rf encoder tx data register 8e h 77 rfenc rf encoder tx control register e7 h 78 rffsld rf frequency synthesizer lock detector configuration df h 79 rffspll rf frequency synthesize r pll configuration d7 h 80 table 51 register overview (cont?d) register short name register long name offset address page number
pma51xx register overview data sheet 199 revision 2.1, 2010-06-02 rfs rf encoder tx st atus register e6 h 81 rftx rf transmitter configuration register ae h 82 rfvco rf frequency synthesizer vco configuration de h 83 rngd random number generator data register ab h 128 sp stack pointer 81 h 65 spib spi baud rate register f3 h 171 spic spi control register f4 h 172 spid spi data register f5 h 173 spim spi mode register f6 h 173 spis spi status register f7 h 175 tcon timer control register timer 0/1 88 h 132 tcon2 timer control register timer 2/3 c8 h 143 th0 timer 0 register high byte 8c h 133 th1 timer 1 register high byte 8d h 133 th2 timer 2 register high byte cd h 144 th3 timer 3 register high byte cb h 144 tl0 timer 0 register low byte 8a h 134 tl1 timer 1 register low byte 8b h 134 tl2 timer 2 register low byte cc h 145 tl3 timer 3 register low byte ca h 145 tmod timer mode register 89 h 135 tmod2 timer mode register 2 timer 2/3 c9 h 146 wuf wake-up flag register c0 h 40 wum wake-up mask register c1 h 41 xtcfg xtal configuration register c2 h 56 xtal1 xtal frequency register fskhigh/ask c3 h 55 xtal0 xtal frequency register fsklow c4 h 55 table 51 register overview (cont?d) register short name register long name offset address page number
pma51xx references data sheet 200 revision 2.1, 2010-06-02 references this section contains documents used for cr oss- reference throughout this document. [1] pma function library guide
pma51xx package outlines data sheet 201 revision 2.1, 2010-06-02 5 package outlines dimensions are defi ned in millimeter. figure 90 package outline pg-tssop-38
published by infineon technologies ag www.infineon.com


▲Up To Search▲   

 
Price & Availability of PMA5105

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X